BeardLib-Editor
BeardLib-Editor copied to clipboard
Element Module Editor side not loading
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
try
MyCustomElementEditor = MyCustomElementEditor or class(MissionScriptEditor)
function MyCustomElementEditor:create_element()
self.super.create_element(self)
self._element.class = "MyCustomElement"
end
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.
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
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