Button fix when right click with placement building (#1319)

pull/1365/head
Thomas (DJ1TJOO) 2 years ago committed by GitHub
parent c346a25d6a
commit 97434a8e4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -22,7 +22,9 @@ export class HUDLeverToggle extends BaseHUDPart {
leverComp.toggled = !leverComp.toggled;
return STOP_PROPAGATION;
} else if (button === enumMouseButton.right) {
this.root.logic.tryDeleteBuilding(contents);
if (!this.root.hud.parts.buildingPlacer.currentMetaBuilding) {
this.root.logic.tryDeleteBuilding(contents);
}
return STOP_PROPAGATION;
}
}

Loading…
Cancel
Save