[2.0.28] Type mismatch between generate_event_name and raise_event
Posted: Tue Dec 24, 2024 1:28 pm
TL:DR The output type of LuaBootstrap::generate_event_name can not be given as input to LuaBootstrap::raise_event.
The return type of LuaBootstrap::generate_event_name is "defines.events"
The input type of LuaBootstrap::raise_event is "uint or string"
This works at runtime but the types are not soundly defined, and so is a documentation issue.
I would suggest using "LuaEventType" which is used as the input for LuaBootstrap::on_event
The return type of LuaBootstrap::generate_event_name is "defines.events"
The input type of LuaBootstrap::raise_event is "uint or string"
This works at runtime but the types are not soundly defined, and so is a documentation issue.
I would suggest using "LuaEventType" which is used as the input for LuaBootstrap::on_event