diff --git a/src/js/game/blueprint.js b/src/js/game/blueprint.js index 3e7cdaa6..a2aa7186 100644 --- a/src/js/game/blueprint.js +++ b/src/js/game/blueprint.js @@ -101,8 +101,11 @@ export class Blueprint { const entity = this.entities[i]; const staticComp = entity.components.StaticMapEntity; - staticComp.rotation = (staticComp.rotation + 90) % 360; - staticComp.originalRotation = (staticComp.originalRotation + 90) % 360; + if (staticComp.getMetaBuilding().getIsRotateable()) { + staticComp.rotation = (staticComp.rotation + 90) % 360; + staticComp.originalRotation = (staticComp.originalRotation + 90) % 360; + } + staticComp.origin = staticComp.origin.rotateFastMultipleOf90(90); } } diff --git a/src/js/game/meta_building.js b/src/js/game/meta_building.js index f3df0b62..7bfbce25 100644 --- a/src/js/game/meta_building.js +++ b/src/js/game/meta_building.js @@ -158,10 +158,9 @@ export class MetaBuilding { /** * Returns whether this building is rotateable - * @param {string} variant * @returns {boolean} */ - getIsRotateable(variant) { + getIsRotateable() { return true; } @@ -243,7 +242,7 @@ export class MetaBuilding { * @return {{ rotation: number, rotationVariant: number, connectedEntities?: Array }} */ computeOptimalDirectionAndRotationVariantAtTile({ root, tile, rotation, variant, layer }) { - if (!this.getIsRotateable(variant)) { + if (!this.getIsRotateable()) { return { rotation: 0, rotationVariant: 0,