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

Fix linting errors

This commit is contained in:
Frode Austvik 2020-12-10 03:52:59 +01:00
parent c1ded81f0e
commit 40499a18c0

View File

@ -74,8 +74,7 @@ export class ItemProcessorSystem extends GameSystemWithFilter {
const processorComp = entity.components.ItemProcessor;
const ejectorComp = entity.components.ItemEjector;
for (let chargeIndex = 0; true; chargeIndex++) {
for (let chargeIndex = 0; ; chargeIndex++) {
// Check if we have an open queue spot and can start a new charge
if (processorComp.ongoingCharges.length < MAX_QUEUED_CHARGES) {
if (this.canProcess(entity)) {
@ -91,7 +90,8 @@ export class ItemProcessorSystem extends GameSystemWithFilter {
// Process next charge
if (currentCharge.remainingTime > 0.0) {
currentCharge.remainingTime -= this.root.dynamicTickrate.deltaSeconds + processorComp.bonusTime;
const deltaTime = this.root.dynamicTickrate.deltaSeconds + processorComp.bonusTime;
currentCharge.remainingTime -= deltaTime;
processorComp.bonusTime = 0;
if (currentCharge.remainingTime > 0.0) {
// This charge is not finished, so don't process the next one