Add raise_event to LuaItemStack::create_blueprint
Posted: Sat May 16, 2020 6:32 pm
Some mods rely on on_player_setup_blueprint to perform fixup tasks on blueprints containing modded entities. If a mod creates a blueprint via script, the event is not raised and has to be raised manually by the mod creating the blueprint to get parity with the normal in-game action.
Request: add 2 a optional parameters to create_blueprint, along the lines of the parameters present for LuaSurface::create_entity() and LuaEntity::destroy(). These parameters would be "raise_event = true" and "player_index = i", where player_index is required if raise_event is true.
Alternatively, create a new event script_raised_setup_blueprint, similar to on_player_setup_blueprint but without the player_index field.
Example bug caused by the current behavior: https://github.com/dewiniaid/BlueprintE ... /issues/33
Request: add 2 a optional parameters to create_blueprint, along the lines of the parameters present for LuaSurface::create_entity() and LuaEntity::destroy(). These parameters would be "raise_event = true" and "player_index = i", where player_index is required if raise_event is true.
Alternatively, create a new event script_raised_setup_blueprint, similar to on_player_setup_blueprint but without the player_index field.
Example bug caused by the current behavior: https://github.com/dewiniaid/BlueprintE ... /issues/33