mirror of
https://github.com/tobspr/shapez.io.git
synced 2026-02-18 13:59:20 +00:00
Fix
Hopefully this fixes pr build issue
This commit is contained in:
parent
2c620ba4fb
commit
91cbb7f496
@ -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,10 +456,12 @@ 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, {
|
||||||
if (!addedBuilding && (i==0 || needSound)){
|
suppressSound: i == 0 || needSound ? false : true,
|
||||||
|
});
|
||||||
|
if (!addedBuilding && (i == 0 || needSound)) {
|
||||||
needSound = true;
|
needSound = true;
|
||||||
}else {
|
} else {
|
||||||
needSound = false;
|
needSound = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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({
|
||||||
@ -189,7 +189,7 @@ export class GameLogic {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Play sound
|
// Play sound
|
||||||
if (sound){
|
if (sound) {
|
||||||
this.root.soundProxy.playUi(building.getPlacementSound());
|
this.root.soundProxy.playUi(building.getPlacementSound());
|
||||||
}
|
}
|
||||||
return entity;
|
return entity;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user