Provide a way to cancel a build action in on_put_item

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
steffenk
Manual Inserter
Manual Inserter
Posts: 2
Joined: Tue Mar 05, 2019 9:26 pm
Contact:

Provide a way to cancel a build action in on_put_item

Post by steffenk »

It would be nice to have a way to cancel the player's build action in the on_put_item handler. This is useful if the mod wants to intercept or modify the build request (e.g. https://mods.factorio.com/mod/BlueprintAlignment modifies the position of a blueprint to align it to a grid).

Currently one way to do this is to take the item out of the player's cursor stack and move it back afterwards (e.g. in the on_player_cursor_stack_changed handler), but this is a rather ugly hack (and causes problems in 0.17 for toolbelt slots which are linked to the blueprint library).
Post Reply

Return to “Modding interface requests”