Undo button does not undo landfill 0.17.62
Undo button does not undo landfill 0.17.62
I misplaced a landfill then pressed the Undo button. Despite the button being labeled as 'Undo placement of landfill' it did not undo the landfill action.
- 5thHorseman
- Smart Inserter
- Posts: 1193
- Joined: Fri Jun 10, 2016 11:21 pm
- Contact:
Re: Undo button does not undo landfill 0.17.62
Sadly for you the bug here is that the button says that, not that it doesn't work.
"Undo" does not actually undo anything, it queues up whatever commands will cause the action to undo. There is no command to actually remove landfill, so that's why the button doesn't work.
"Undo" does not actually undo anything, it queues up whatever commands will cause the action to undo. There is no command to actually remove landfill, so that's why the button doesn't work.
Re: Undo button does not undo landfill 0.17.62
Before this inevitable will be flagged as "not a bug", here's my take on this as modder.
The API should allow mods like Waterfill to register actions to undo Landfills. If not this is should become an API request.
The API should allow mods like Waterfill to register actions to undo Landfills. If not this is should become an API request.
My Mods: mods.factorio.com
Re: Undo button does not undo landfill 0.17.62
Thanks for the report.
At first I was gonna change it so that if tile building can't be undone, it won't be added to the undo queue, but after experimenting with it a little bit, I decided it is not such a good idea and will move this to Minor issues instead.
The problem is, that if you expect landfill undo to work, and you hit Ctrl + Z after using landfill, an action that you did before landfilling would be undone, possibly without you noticing.
In addition to that ... if you make landfill ghosts, those can be undone until they are built to real tile, so it would have to be removed from the queue after that and it's not something the undo system can deal with at the moment.
At first I was gonna change it so that if tile building can't be undone, it won't be added to the undo queue, but after experimenting with it a little bit, I decided it is not such a good idea and will move this to Minor issues instead.
The problem is, that if you expect landfill undo to work, and you hit Ctrl + Z after using landfill, an action that you did before landfilling would be undone, possibly without you noticing.
In addition to that ... if you make landfill ghosts, those can be undone until they are built to real tile, so it would have to be removed from the queue after that and it's not something the undo system can deal with at the moment.
- eradicator
- Smart Inserter
- Posts: 5206
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: Undo button does not undo landfill 0.17.62
Just hit this myself trying to implement creative-style "instant undo". There being no event raised at all makes this impossible for landfill.
This is true, but the no-op "undo" has no feedback. Maybe a sound or flying text or big flashy icon or something could at least inform the user about what just (not) happend. And i wouldn't be too angry if some kind of event let my mod handle the situation ;).
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.