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

Fix belts

This commit is contained in:
tobspr 2021-05-03 17:55:36 +02:00
parent 9d8ae031d0
commit e5e12c3ff8

View File

@ -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