BeardLib-Editor icon indicating copy to clipboard operation
BeardLib-Editor copied to clipboard

Element Module Editor side not loading

Open RexTheWho opened this issue 2 years ago • 4 comments

Describe the bug

Describe the bug MyCustomElement loads and functions properly MyCustomElementEditor doesnt despite core lua suggesting it should load

The element works ingame but no editor UI functions.

Steps to reproduce the issue

To Reproduce Steps to reproduce the behavior: Main.xml add,

	<Elements directory="elements">
	    <element name="MyCustom"/>
	</Elements>

Directory elements/MyCustomElement.lua

MyCustomElement = MyCustomElement or class(MissionScriptEditor)
function MyCustomElement:create_element()
    self.super.create_element(self)
    self._element.class = "MyCustomElement" 
end

Log file

No response

Minimal reproduction

No response

RexTheWho avatar Mar 18 '22 08:03 RexTheWho

try

MyCustomElementEditor = MyCustomElementEditor or class(MissionScriptEditor)
function MyCustomElementEditor:create_element()
    self.super.create_element(self)
    self._element.class = "MyCustomElement" 
end

Luffyyy avatar Mar 18 '22 12:03 Luffyyy

try

MyCustomElementEditor = MyCustomElementEditor or class(MissionScriptEditor)
function MyCustomElementEditor:create_element()
    self.super.create_element(self)
    self._element.class = "MyCustomElement" 
end

Doesnt seem to fix it, Ive also gone and reorganized by problem classes to use the proper Name-Element-Editor convention.

RexTheWho avatar Mar 18 '22 12:03 RexTheWho

Did some poking, Editors Core.lua BLEInjectElements does not get run at all.

Logged MissionElementsModule and that prints, but nothing prints from the inject elements section of Beardlib Core.lua

RexTheWho avatar Mar 27 '22 04:03 RexTheWho

The problem with it is that BLEInjectElements hook is added after ElementModule is finished with it's stuff. It's like this; Adding element X, calling BLEInjectElements hook (which does not exist yet) Adding element Y, calling BLEInjectElements hook (which does not exist yet) Adding BLEinjectElements hook

MiamiCenterPL avatar Sep 13 '22 20:09 MiamiCenterPL