1
0
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:
isaisstillalive 2020-07-10 11:39:06 +09:00
parent 51126c7b19
commit 8b10c21aa4

View File

@ -19,11 +19,16 @@ export class ItemProcessorSystem extends GameSystemWithFilter {
const processorComp = entity.components.ItemProcessor;
const ejectorComp = entity.components.ItemEjector;
// First of all, process the current recipe
processorComp.secondsUntilEject =
processorComp.secondsUntilEject - this.root.dynamicTickrate.deltaSeconds;
if (processorComp.secondsUntilEject > 0) {
// First of all, process the current recipe
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;
}
@ -80,11 +85,6 @@ export class ItemProcessorSystem extends GameSystemWithFilter {
}
}
}
// Remove time carryover if processing is not continuous
if (processorComp.secondsUntilEject < 0) {
processorComp.secondsUntilEject = 0;
}
}
}