Add raise_event to LuaItemStack::create_blueprint

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
User avatar
Therax
Filter Inserter
Filter Inserter
Posts: 471
Joined: Sun May 21, 2017 6:28 pm
Contact:

Add raise_event to LuaItemStack::create_blueprint

Post by Therax »

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
Miniloader — UPS-friendly 1x1 loaders
Bulk Rail Loaders — Rapid train loading and unloading
Beltlayer & Pipelayer — Route items and fluids freely underground
Post Reply

Return to “Modding interface requests”