Code: Select all
/c
script.on_event(defines.events.on_player_setup_blueprint, function(e)
game.print(e.item)
end)
Code: Select all
/c
script.on_event(defines.events.on_player_setup_blueprint, function(e)
game.print(e.item)
end)
The api event doc states:
As the player.cursor_stack is already replaced by the blueprint during the event there's no way to distinguish between a normal blueprint select and a copy-paste-tool select otherwise.item :: string: The item used to select the area.
I can update the Lua docs if wanted. But I don't consider it worth the time and annoying complexity to do anything around copy/cut-paste and blueprint re-assigning. It's a giant spaghetti mess that I don't want to stick more spaghetti code around. It's "what it is" and if it works for some peoples purposes that's great but after years of trying to make all the cases people have work It's just not worth it. Sorry.eradicator wrote: ↑Mon Dec 07, 2020 2:56 pmThe api event doc states:As the player.cursor_stack is already replaced by the blueprint during the event there's no way to distinguish between a normal blueprint select and a copy-paste-tool select otherwise.item :: string: The item used to select the area.
Yes please. At the very least that should prevent other people from also getting a headache :D.