From 91cbb7f4968bb0fd5d71bcb11e23092f20beff2f Mon Sep 17 00:00:00 2001 From: Triston Stuart Date: Wed, 24 Jun 2020 03:50:36 -0700 Subject: [PATCH] Fix Hopefully this fixes pr build issue --- src/js/game/hud/parts/building_placer_logic.js | 14 ++++++++------ src/js/game/logic.js | 8 ++++---- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/js/game/hud/parts/building_placer_logic.js b/src/js/game/hud/parts/building_placer_logic.js index 3e99c36e..de474ed7 100644 --- a/src/js/game/hud/parts/building_placer_logic.js +++ b/src/js/game/hud/parts/building_placer_logic.js @@ -389,7 +389,7 @@ export class HUDBuildingPlacerLogic extends BaseHUDPart { originalRotation: this.currentBaseRotation, building: this.currentMetaBuilding.get(), variant: this.currentVariant.get(), - sound: ((options.supressSound!=null)? !options.supressSound : true) + sound: options.suppressSound != null ? !options.suppressSound : true, }); if (entity) { @@ -456,11 +456,13 @@ export class HUDBuildingPlacerLogic extends BaseHUDPart { this.currentBaseRotation = rotation; // Add supressSound flag - let addedBuilding = this.tryPlaceCurrentBuildingAt(tile, {supressSound: ((i==0||needSound)? false : true)}); - if (!addedBuilding && (i==0 || needSound)){ - needSound = true; - }else { - needSound = false; + let addedBuilding = this.tryPlaceCurrentBuildingAt(tile, { + suppressSound: i == 0 || needSound ? false : true, + }); + if (!addedBuilding && (i == 0 || needSound)) { + needSound = true; + } else { + needSound = false; } } }); diff --git a/src/js/game/logic.js b/src/js/game/logic.js index d9cb2d6d..48e32c7c 100644 --- a/src/js/game/logic.js +++ b/src/js/game/logic.js @@ -154,8 +154,8 @@ export class GameLogic { * @param {boolean} param0.sound * @returns {Entity} */ - tryPlaceBuilding({ origin, rotation, rotationVariant, originalRotation, variant, building, sound }) { - sound = (sound!==null)? sound : true; // Check for sound argument + tryPlaceBuilding({ origin, rotation, rotationVariant, originalRotation, variant, building, sound }) { + sound = sound !== null ? sound : true; // Check for sound argument if (this.checkCanPlaceBuilding({ origin, rotation, rotationVariant, variant, building })) { // Remove any removeable entities below const checker = new StaticMapEntityComponent({ @@ -189,8 +189,8 @@ export class GameLogic { }); // Play sound - if (sound){ - this.root.soundProxy.playUi(building.getPlacementSound()); + if (sound) { + this.root.soundProxy.playUi(building.getPlacementSound()); } return entity; }