1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2026-02-13 19:39:20 +00:00
Hopefully this fixes pr build issue
This commit is contained in:
Triston Stuart 2020-06-24 03:50:36 -07:00
parent 2c620ba4fb
commit 91cbb7f496
2 changed files with 12 additions and 10 deletions

View File

@ -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;
}
}
});

View File

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