1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2026-02-18 13:59: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, originalRotation: this.currentBaseRotation,
building: this.currentMetaBuilding.get(), building: this.currentMetaBuilding.get(),
variant: this.currentVariant.get(), variant: this.currentVariant.get(),
sound: ((options.supressSound!=null)? !options.supressSound : true) sound: options.suppressSound != null ? !options.suppressSound : true,
}); });
if (entity) { if (entity) {
@ -456,7 +456,9 @@ export class HUDBuildingPlacerLogic extends BaseHUDPart {
this.currentBaseRotation = rotation; this.currentBaseRotation = rotation;
// Add supressSound flag // Add supressSound flag
let addedBuilding = this.tryPlaceCurrentBuildingAt(tile, {supressSound: ((i==0||needSound)? false : true)}); let addedBuilding = this.tryPlaceCurrentBuildingAt(tile, {
suppressSound: i == 0 || needSound ? false : true,
});
if (!addedBuilding && (i == 0 || needSound)) { if (!addedBuilding && (i == 0 || needSound)) {
needSound = true; needSound = true;
} else { } else {

View File

@ -155,7 +155,7 @@ export class GameLogic {
* @returns {Entity} * @returns {Entity}
*/ */
tryPlaceBuilding({ origin, rotation, rotationVariant, originalRotation, variant, building, sound }) { tryPlaceBuilding({ origin, rotation, rotationVariant, originalRotation, variant, building, sound }) {
sound = (sound!==null)? sound : true; // Check for sound argument sound = sound !== null ? sound : true; // Check for sound argument
if (this.checkCanPlaceBuilding({ origin, rotation, rotationVariant, variant, building })) { if (this.checkCanPlaceBuilding({ origin, rotation, rotationVariant, variant, building })) {
// Remove any removeable entities below // Remove any removeable entities below
const checker = new StaticMapEntityComponent({ const checker = new StaticMapEntityComponent({