1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-06-13 13:04:03 +00:00

Fix not to stall

This commit is contained in:
isaisstillalive 2020-06-30 11:46:10 +09:00
parent db30dccf4c
commit a7cb235f2f

View File

@ -22,7 +22,6 @@ export class ChainableSplitterSystem extends GameSystemWithFilter {
} }
const leftEdgeEntity = this.getLeftEdgeEntity(entity); const leftEdgeEntity = this.getLeftEdgeEntity(entity);
this.reset = true;
if (this.tryEject(leftEdgeEntity, splitterComp.inputItem)) { if (this.tryEject(leftEdgeEntity, splitterComp.inputItem)) {
splitterComp.inputItem = null; splitterComp.inputItem = null;
} }
@ -52,7 +51,6 @@ export class ChainableSplitterSystem extends GameSystemWithFilter {
tryEject(entity, item) { tryEject(entity, item) {
const splitterComp = entity.components.ChainableSplitter; const splitterComp = entity.components.ChainableSplitter;
if (!splitterComp.ejected) { if (!splitterComp.ejected) {
this.reset = false;
const ejectComp = entity.components.ItemEjector; const ejectComp = entity.components.ItemEjector;
if (ejectComp.canEjectOnSlot(0)) { if (ejectComp.canEjectOnSlot(0)) {
@ -72,9 +70,7 @@ export class ChainableSplitterSystem extends GameSystemWithFilter {
return true; return true;
} }
if (this.reset) { splitterComp.ejected = false;
splitterComp.ejected = false;
}
return false; return false;
} }
} }