Hi!
The Item Elevators have a bug, where they can "de-sync" from their pair, and from that point on, if I try to remove/rotate it, it causes a non-recoverable error, and the the game exits to the main menu. Once the elevators are de-synced, the save is pretty much corrupted from that point on, as the entities can no longer be removed.
How to reproduce:
- Have at least two levels (e.g.: overworld, and one subsurface level) - I'll call them Layer 'A' and Layer 'B'
- Place an item elevator of any tier on Layer 'A'.
- Move to Layer 'B'
- Place the elevator's pair on 'Layer 'B'
- At this point, they are paired and work as expected
- If I hover over the elevator without the item in hand, and try to rotate, it switches the "layer transport direction" from Layer 'A' -> Layer 'B' to Layer 'B' -> Layer 'A' - the expected behavior.
- But, if I have the item in hand, and hover over the elevator on any of the layers, and I try to rotate, it will rotate the item elevator itself, not the "layer direction"
- If I placed the elevator with the belt facing down, I can rotate it, so the belt would be facing right for example.
- At this point, they are still synced. I can still remove or switch the layer transport direction.
- Now, if I replace the item elevator, e.g. upgrading from Tier 1 to Tier 2, or downgrading, they will de-sync.
- Now, when I hover over it, I no longer see the layer transport direction, but just the yellow boundaries of the placed item.
- Try to rotate or remove the item elevator, and it will cause a non-recoverable error
Rotate:
Error while running event Subsurface::subsurface-rotate (ID 301)
__Subsurface__/scripts/elevators.lua:25: attempt to index field '?' (a nil value)
stack traceback:
__Subsurface__/scripts/elevators.lua:25: in function 'switch_elevator'
__Subsurface__/scripts/elevators.lua:158: in function 'elevator_rotated'
__Subsurface__/control.lua:918: in function <__Subsurface__/control.lua:912>
Remove:
Error while running event Subsurface::on_player_mined_entity (ID 76)
__Subsurface__/scripts/elevators.lua:270: bad argument #1 of 2 to 'ipairs' (table expected, got nil)
stack traceback:
[C]: in function 'ipairs'
__Subsurface__/scripts/elevators.lua:270: in function 'elevator_removed'
__Subsurface__/control.lua:647: in function <__Subsurface__/control.lua:643>
I love the mod! And many-many thanks for investing the time and effort in it!