Page 1 of 1

Collect undo-able actions from the same tick into one action.

Posted: Mon Apr 26, 2021 5:06 pm
by eradicator
Working on Eradicator's Belt Planner I've hit the undo-ability wall. Almost all scripted entity de-/construction is impossible to make undo-able for the player. The only thing that seems undoable is LuaPlayer.build_from_cursor() but this creates a seperate undo-action for every entity built this way (potentially hundreds) - but the player expects them all to be undone at once like a normal batch actions (blueprint, decon, ,upgrade, rail planner).

Lacking any ability to more directly interact with undo (LuaSurface.create_entity, LuaEntity.order_deconstruction, etc) it would be nice if at least build_from_cursor would act more like the user expects it to.

Related topics:
LuaPlayer.build_history [RW]. A way to read and edit the undo queue, Allow mods BP orders to be undo-able!