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

Carry forward only when processing is continuous

This commit is contained in:
isaisstillalive 2020-07-08 23:50:27 +09:00
parent 21a9027add
commit 9d4f5c50fe

View File

@ -20,10 +20,8 @@ export class ItemProcessorSystem extends GameSystemWithFilter {
const ejectorComp = entity.components.ItemEjector;
// First of all, process the current recipe
if (processorComp.secondsUntilEject > 0) {
processorComp.secondsUntilEject =
processorComp.secondsUntilEject - this.root.dynamicTickrate.deltaSeconds;
}
if (G_IS_DEV && globalConfig.debug.instantProcessors) {
processorComp.secondsUntilEject = 0;
@ -82,6 +80,11 @@ export class ItemProcessorSystem extends GameSystemWithFilter {
}
}
}
// Remove time carryover if processing is not continuous
if (processorComp.secondsUntilEject < 0) {
processorComp.secondsUntilEject = 0;
}
}
}