From 33d2e678becf92f9116803bff888baf468ac4246 Mon Sep 17 00:00:00 2001 From: Tobias Springer Date: Sat, 9 May 2020 17:12:40 +0200 Subject: [PATCH] Fix crash about hub not being an item processor --- src/js/game/hub_goals.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/js/game/hub_goals.js b/src/js/game/hub_goals.js index a14239ac..30bced0f 100644 --- a/src/js/game/hub_goals.js +++ b/src/js/game/hub_goals.js @@ -308,6 +308,7 @@ export class HubGoals extends BasicSerializableObject { getProcessorBaseSpeed(processorType) { switch (processorType) { case enumItemProcessorTypes.trash: + case enumItemProcessorTypes.hub: return 1e30; case enumItemProcessorTypes.splitter: return (2 / globalConfig.beltSpeedItemsPerSecond) * this.upgradeImprovements.splitter; @@ -321,8 +322,9 @@ export class HubGoals extends BasicSerializableObject { this.upgradeImprovements.processor * globalConfig.buildingSpeeds[processorType] ); + default: - assertAlways(false, "invalid processor type"); + assertAlways(false, "invalid processor type: " + processorType); } return 1 / globalConfig.beltSpeedItemsPerSecond;