Kuxynator's Slim-Inserters


<BETA for Factorio 2.0> 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. New: Full configurable with Smart Inserters mod

Content
5 days ago
1.1 - 2.0
1.12K
Logistics

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

1 year, 3 months 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.

1 year, 3 months ago
(updated 1 year, 3 months 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.

1 year, 3 months ago

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

1 year, 3 months 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