mirror of
https://github.com/tobspr/shapez.io.git
synced 2025-06-13 13:04:03 +00:00
Fixed carryover always
This commit is contained in:
parent
51126c7b19
commit
8b10c21aa4
@ -19,11 +19,16 @@ export class ItemProcessorSystem extends GameSystemWithFilter {
|
|||||||
const processorComp = entity.components.ItemProcessor;
|
const processorComp = entity.components.ItemProcessor;
|
||||||
const ejectorComp = entity.components.ItemEjector;
|
const ejectorComp = entity.components.ItemEjector;
|
||||||
|
|
||||||
// First of all, process the current recipe
|
if (processorComp.secondsUntilEject > 0) {
|
||||||
processorComp.secondsUntilEject =
|
// First of all, process the current recipe
|
||||||
processorComp.secondsUntilEject - this.root.dynamicTickrate.deltaSeconds;
|
processorComp.secondsUntilEject =
|
||||||
|
processorComp.secondsUntilEject - this.root.dynamicTickrate.deltaSeconds;
|
||||||
|
|
||||||
if (G_IS_DEV && globalConfig.debug.instantProcessors) {
|
if (G_IS_DEV && globalConfig.debug.instantProcessors) {
|
||||||
|
processorComp.secondsUntilEject = 0;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// Remove time carryover if processing is not continuous
|
||||||
processorComp.secondsUntilEject = 0;
|
processorComp.secondsUntilEject = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -80,11 +85,6 @@ export class ItemProcessorSystem extends GameSystemWithFilter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove time carryover if processing is not continuous
|
|
||||||
if (processorComp.secondsUntilEject < 0) {
|
|
||||||
processorComp.secondsUntilEject = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user