Kuxynator's Slim-Inserters (Spage Age)


<Experimental mod, early access> A new approach to inserters: they are attached directly to machines, chest and belts: Build more compact! Also Introducing double- and dual -inserters: Use 2 inserters on one tile and fill 2 lanes simultaneously. Full configurable with Smart Inserters mod NOW useable on space plattform.

Content
7 months ago
1.1 - 2.0
1.84K
Logistics

b [BUG:3] Error while running event Kux-SlimInserters::on_built_entity (ID 6) [Ctrl-Z feature]

2 years ago

Error while running event Kux-SlimInserters::on_built_entity (ID 6)
Unknown entity name: stack-filter-slim-inserter_part-bslim-inserter_part-b
stack traceback:
[C]: in function 'create_entity'
Kux-SlimInserters/events/on_built_entity.lua:48: in function <Kux-SlimInserters/events/on_built_entity.lua:8>

Steps to reproduce the crash:
1. Place a slim inserter and then place another slim inserter to create a Dual Inserter.
2. Right-click to delete the Dual Inserter, then press Ctrl+Z to undo, restoring a small slim inserter.
3. Place another slim inserter on this small slim inserter, and the game will crash.

2 years ago
(updated 2 years ago)

Thank you very much for investigating this.
The Ctrl+Z case ist not yet implemented, but I will do this now.

EDIT:
The best way for the Undo feature would be to restore both inserters, but unfortunately at this time I have no no information about which one that was.
a) I could implement a queue for removed inserters, but this could be complcated and raises further questions, how many step backward should I remember, how do indentify the the deleted inserter, because removed entities have no unit_number....
b) I could suppress undo so that the restored single inverter ghost is removed immediately.

2 years ago

2.0.6 undo disabled, solution a) need more time...

2 years ago

Thanks for the detailed explanation. I'm not familiar with the code, so I can't offer a solution. Also, I feel that this undo action may not be common, but as long as it prevents the game from crashing, it's good enough.

New response