diff --git a/src/js/game/systems/item_ejector.js b/src/js/game/systems/item_ejector.js index 316dc053..edc1c16b 100644 --- a/src/js/game/systems/item_ejector.js +++ b/src/js/game/systems/item_ejector.js @@ -185,7 +185,7 @@ export class ItemEjectorSystem extends GameSystemWithFilter { } // Precompute effective belt speed - let progressGrowth = 2 * this.root.dynamicTickrate.deltaSeconds; + let progressGrowth = this.root.dynamicTickrate.deltaSeconds; if (G_IS_DEV && globalConfig.debug.instantBelts) { progressGrowth = 1; diff --git a/src/js/game/systems/item_processor.js b/src/js/game/systems/item_processor.js index 8713f599..49b77fce 100644 --- a/src/js/game/systems/item_processor.js +++ b/src/js/game/systems/item_processor.js @@ -29,9 +29,26 @@ export class ItemProcessorSystem extends GameSystemWithFilter { processorComp.secondsUntilEject = 0; } - // Check if we have any finished items we can eject if ( processorComp.secondsUntilEject === 0 && // it was processed in time + processorComp.itemsToEject.length === 0 // Check if we have an empty queue and can start a new charge + ) { + if (processorComp.inputSlots.length >= processorComp.inputsPerCharge) { + const energyConsumerComp = entity.components.EnergyConsumer; + if (energyConsumerComp) { + // Check if we have enough energy + if (energyConsumerComp.tryStartNextCharge()) { + this.startNewCharge(entity); + } + } else { + // No further checks required + this.startNewCharge(entity); + } + } + } + + // Check if we have any finished items we can eject + if ( processorComp.itemsToEject.length > 0 // we have some items left to eject ) { for (let itemIndex = 0; itemIndex < processorComp.itemsToEject.length; ++itemIndex) { @@ -66,22 +83,6 @@ export class ItemProcessorSystem extends GameSystemWithFilter { } } } - - // Check if we have an empty queue and can start a new charge - if (processorComp.itemsToEject.length === 0) { - if (processorComp.inputSlots.length >= processorComp.inputsPerCharge) { - const energyConsumerComp = entity.components.EnergyConsumer; - if (energyConsumerComp) { - // Check if we have enough energy - if (energyConsumerComp.tryStartNextCharge()) { - this.startNewCharge(entity); - } - } else { - // No further checks required - this.startNewCharge(entity); - } - } - } } }