Redo


Adds a redo keybind and shortcut for when you undo too much.

Utilities
3 months ago
1.1
3.96K

b βœ… Crash when undoing alien biomes

1 year, 7 months ago

First of all, awesome mod! They should definitely include your mod in the base game. The bug is that the game crashed when undoing/redoing landfill. Should be easy to repro. If not, let me know and I'll try it again and get detailed repro steps.

1 year, 7 months ago

Are you using Landfill Plus? There's a bug in their code that I can't fix, which I have reported here.
There shouldn't be any issues with vanilla landfill placement, as I haven't actually added support for tiles (yet?).
I should probably mark redo as incompatible until they get around to fixing it, so thanks for the reminder.

1 year, 7 months ago

Also, thanks for the support, I'm glad to see people are finding use out of this :P

1 year, 7 months ago

Ok, I tried to go back and repro it and it wasn't actually related to landfill - it was this:

The mod Redo (0.2.2) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event redo::undo (ID 289)
tree-wetland-g can not be part a entity ghost.
stack traceback:
[C]: in function 'create_entity'
redo/control.lua:496: in function 'create_entity_ghost'
redo/control.lua:567: in function '?'
redo/control.lua:653: in function 'input_action'
redo/control.lua:661: in function <redo/control.lua:661>

And it actually happened during undo, not redo. The repro is simple - just place the ghost of an item (e.g. an inserter) over a tree (hold down shift to be able to place the ghost, which will also queue the tree for deconstruction), then then press CTRL+Z (or whatever your undo is mapped to).

I have SE + K2 + Alien Biomes installed too but I'm not sure if that's relevant.

Thanks!

1 year, 7 months ago

Ah, that's the alien biomes bug that's been haunting me. It's trees are getting past my ghost-able filter, I'll take a look and see what I can do.

1 year, 7 months ago

It turns out a robot had actually fulfilled the deconstruction request. It wasn't placing of the inserter that caused the bug, it was simply undoing after the tree was gone, since I guess it tried to put back a ghost of the tree.

1 year, 7 months ago

Yep, one of the things in the mod is keeping track of which entities can be ghosted or not, and if they aren't, then I don't create ghosts for them if you undo after their removal. That way you can still undo marking stuff like trees for deconstruction, but it won't (or at least it's not supposed to) try to make a ghost of it after it's already gone. The nature in alien biomes is somehow getting past that filter, but I was never able to reproduce it on my own machine so I couldn't fix it until now. (I think it's listed as one of the known bugs in the mod portal description)

1 year, 7 months ago

I figured it out! If you mark a tree for deconstruction, then mine it, then undo, it would try to place a tree ghost. Just mining it wouldn't trigger the effect, that's why I couldn't reproduce it before. I believe I finally fixed it in 0.2.4, there shouldn't be any crashes related to not-ghostable entities anymore.

1 year, 7 months ago

Thanks for the quick fix! It almost works :) It doesn't crash anymore when undoing, BUT, it doesn't actually undo the ghosts that were on top of the trees. And no matter how many times you spam CTRL+Z it won't undo the ghosts on top of the trees. I haven't waited to see what will happen with the robots. I assume they'll try to satisfy the ghosts but will just hover there since the tress are still there (no longer marked for removal).

1 year, 7 months ago

Hmm, I noticed that as well but that's due to entity collision checks and queue ordering, that's next on my list. I just wanted to push something that doesn't crash the game first, then fix whatever feature issues were left over :P

1 year, 7 months ago

I hope the support for Landfill plus gets resolved even if it takes time.

1 year, 7 months ago

I do too, though it seems like the author hasn't been online recently. All I can do is wait, since I can't fix it on my end. :(

New response