mirror of
https://github.com/tobspr/shapez.io.git
synced 2026-03-02 03:39:21 +00:00
Fix items being stuck on belts
This commit is contained in:
@@ -25,5 +25,21 @@ export class SavegameInterface_V1005 extends SavegameInterface_V1004 {
|
||||
|
||||
// just reset belt paths for now
|
||||
dump.beltPaths = [];
|
||||
|
||||
const entities = dump.entities;
|
||||
|
||||
// clear ejector slots
|
||||
for (let i = 0; i < entities.length; ++i) {
|
||||
const entity = entities[i];
|
||||
const itemEjector = entity.components.ItemEjector;
|
||||
if (itemEjector) {
|
||||
const slots = itemEjector.slots;
|
||||
for (let k = 0; k < slots.length; ++k) {
|
||||
const slot = slots[k];
|
||||
slot.item = null;
|
||||
slot.progress = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user