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,6 +19,7 @@ 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;
|
||||||
|
|
||||||
|
if (processorComp.secondsUntilEject > 0) {
|
||||||
// First of all, process the current recipe
|
// First of all, process the current recipe
|
||||||
processorComp.secondsUntilEject =
|
processorComp.secondsUntilEject =
|
||||||
processorComp.secondsUntilEject - this.root.dynamicTickrate.deltaSeconds;
|
processorComp.secondsUntilEject - this.root.dynamicTickrate.deltaSeconds;
|
||||||
@ -26,6 +27,10 @@ export class ItemProcessorSystem extends GameSystemWithFilter {
|
|||||||
if (G_IS_DEV && globalConfig.debug.instantProcessors) {
|
if (G_IS_DEV && globalConfig.debug.instantProcessors) {
|
||||||
processorComp.secondsUntilEject = 0;
|
processorComp.secondsUntilEject = 0;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// Remove time carryover if processing is not continuous
|
||||||
|
processorComp.secondsUntilEject = 0;
|
||||||
|
}
|
||||||
|
|
||||||
// Check if we have any finished items we can eject
|
// Check if we have any finished items we can eject
|
||||||
if (
|
if (
|
||||||
@ -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