sparr / factorio-mod-entity-symmetry

A mod for the game Factorio, places rotated/mirrored entities around specified points.
MIT License
2 stars 0 forks source link

Entities are not automatically built in editor mode / undo does not work #11

Open EMeindertsma opened 3 weeks ago

EMeindertsma commented 3 weeks ago

Entities are not automatically built in editor mode with "Instant blueprint building" turned on, instead they stay as blueprints. I think this is also causing my other issue: undo does not work for (blueprinted) entities placed by the mod.

I'm working with rails if that matters. Factorio version 2.0.11, entity symmetry 2.1.2.

sparr commented 3 weeks ago

I noticed the undo problem recently. That's new, it worked before. I'll try to figure it out.

I'm not sure why my blueprint placements don't trigger instant blueprint building. As a workaround, you can enable cheat mode which will directly place entities regardless of whether you're in editor mode.

EMeindertsma commented 3 weeks ago

The cheat mode works. but then (as you may already know) the undo still does not work.

I think there are two ways in which it could work, either

I'm not sure which is more feasible though.

sparr commented 3 weeks ago

The undo stack is sadly very opaque to mods. We have to rely on the emitted build/ghost/deconstruct events. I wasn't able to figure this out while fixing the other bug today, but I'll look into it again soon.