From e5e12c3ff8268e30b4b0f827a32d9234fce7674a Mon Sep 17 00:00:00 2001 From: tobspr Date: Mon, 3 May 2021 17:55:36 +0200 Subject: [PATCH] Fix belts --- src/js/game/systems/belt.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/js/game/systems/belt.js b/src/js/game/systems/belt.js index 62e98b33..00491eff 100644 --- a/src/js/game/systems/belt.js +++ b/src/js/game/systems/belt.js @@ -123,10 +123,6 @@ export class BeltSystem extends GameSystemWithFilter { return; } - if (this.root.immutableOperationRunning) { - return; - } - const metaBelt = gMetaBuildingRegistry.findByClass(MetaBeltBuilding); // Compute affected area const originalRect = staticComp.getTileSpaceBounds(); @@ -168,7 +164,10 @@ export class BeltSystem extends GameSystemWithFilter { // Compute delta to see if anything changed const newDirection = arrayBeltVariantToRotation[rotationVariant]; - if (targetStaticComp.rotation !== rotation || newDirection !== targetBeltComp.direction) { + if ( + !this.root.immutableOperationRunning && + (targetStaticComp.rotation !== rotation || newDirection !== targetBeltComp.direction) + ) { const originalPath = targetBeltComp.assignedPath; // Ok, first remove it from its current path