From 64546d65543fabf4ec9ef3511c5292293ca5f7d9 Mon Sep 17 00:00:00 2001 From: Sense101 <67970865+Sense101@users.noreply.github.com> Date: Fri, 16 Apr 2021 09:36:13 +0100 Subject: [PATCH] prettier --- src/js/game/systems/belt_reader.js | 15 ++++++--------- src/js/webworkers/tsconfig.json | 2 +- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/js/game/systems/belt_reader.js b/src/js/game/systems/belt_reader.js index 14518181..5cde34ca 100644 --- a/src/js/game/systems/belt_reader.js +++ b/src/js/game/systems/belt_reader.js @@ -24,12 +24,14 @@ export class BeltReaderSystem extends GameSystemWithFilter { } pinsComp.slots[1].value = readerComp.lastItem; - if( (readerComp.lastItemTimes[readerComp.lastItemTimes.length - 1] || 0) > - minimumTimeForThroughput) { + if ( + (readerComp.lastItemTimes[readerComp.lastItemTimes.length - 1] || 0) > + minimumTimeForThroughput + ) { pinsComp.slots[0].value = BOOL_TRUE_SINGLETON; } else { pinsComp.slots[0].value = BOOL_FALSE_SINGLETON; - if(entity.components.ItemEjector.canEjectOnSlot(0)) { + if (entity.components.ItemEjector.canEjectOnSlot(0)) { readerComp.lastItem = null; } } @@ -50,15 +52,10 @@ export class BeltReaderSystem extends GameSystemWithFilter { } throughput = 1 / (averageSpacing / averageSpacingNum); - const decimal = throughput - Math.floor(throughput); - if(decimal > 0.8) - { - throughput = Math.round(throughput); - } } readerComp.lastThroughput = Math.min(globalConfig.beltSpeedItemsPerSecond * 23.9, throughput); } } } -} \ No newline at end of file +} diff --git a/src/js/webworkers/tsconfig.json b/src/js/webworkers/tsconfig.json index dce06856..3a428cfc 100644 --- a/src/js/webworkers/tsconfig.json +++ b/src/js/webworkers/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - "lib": ["ES2018","WebWorker"] + "lib": ["ES2018", "WebWorker"] }, "exclude": [], "extends": "../tsconfig",