Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Element Module Editor side not loading #707

Open
RexTheWho opened this issue Mar 18, 2022 · 4 comments
Open

Element Module Editor side not loading #707

RexTheWho opened this issue Mar 18, 2022 · 4 comments
Labels

Comments

@RexTheWho
Copy link

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 RexTheWho added the bug label Mar 18, 2022
@Luffyyy
Copy link
Owner

Luffyyy commented Mar 18, 2022

try

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

@RexTheWho
Copy link
Author

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
Copy link
Author

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

@MiamiCenterPL
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants