mirror of
https://github.com/tobspr/shapez.io.git
synced 2025-06-13 13:04:03 +00:00
Hide Puzzle Editor Controls in regular game mode, fix typo
This commit is contained in:
parent
569921b51a
commit
640d1065f0
@ -47,7 +47,7 @@ export class GameMode extends BasicSerializableObject {
|
||||
constructor(root) {
|
||||
super();
|
||||
this.root = root;
|
||||
this.hiddenHurtParts = {};
|
||||
this.hiddenHudParts = {};
|
||||
|
||||
/** @type {typeof MetaBuilding[]} */
|
||||
this.hiddenBuildings = [MetaItemProducerBuilding];
|
||||
@ -83,7 +83,7 @@ export class GameMode extends BasicSerializableObject {
|
||||
* @returns {boolean}
|
||||
*/
|
||||
isHudPartExcluded(name) {
|
||||
return this.hiddenHurtParts[name] === false;
|
||||
return this.hiddenHudParts[name] === false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -234,7 +234,7 @@ export class HUDBuildingPlacer extends HUDBuildingPlacerLogic {
|
||||
* @param {DrawParameters} parameters
|
||||
*/
|
||||
draw(parameters) {
|
||||
if (this.root.camera.zoomLevel < globalConfig.mapChunkOverviewMinZoom) {
|
||||
if (this.root.camera.getIsMapOverlayActive()) {
|
||||
// Dont allow placing in overview mode
|
||||
this.domAttach.update(false);
|
||||
this.variantsAttach.update(false);
|
||||
|
@ -430,7 +430,7 @@ export class HUDBuildingPlacerLogic extends BaseHUDPart {
|
||||
* @param {Vector} tile
|
||||
*/
|
||||
tryPlaceCurrentBuildingAt(tile) {
|
||||
if (this.root.camera.zoomLevel < globalConfig.mapChunkOverviewMinZoom) {
|
||||
if (this.root.camera.getIsMapOverlayActive()) {
|
||||
// Dont allow placing in overview mode
|
||||
return;
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ export class PuzzleGameMode extends GameMode {
|
||||
|
||||
const data = this.getSaveData();
|
||||
|
||||
this.hiddenHurtParts = {
|
||||
this.hiddenHudParts = {
|
||||
[HUDGameMenu.name]: false,
|
||||
[HUDMassSelector.name]: false,
|
||||
[HUDInteractiveTutorial.name]: false,
|
||||
|
@ -13,6 +13,7 @@ import { enumGameModeIds, enumGameModeTypes, GameMode } from "../game_mode";
|
||||
import { ShapeDefinition } from "../shape_definition";
|
||||
import { enumHubGoalRewards } from "../tutorial_goals";
|
||||
import { HUDPuzzleDLCLogo } from "../hud/parts/puzzle_dlc_logo";
|
||||
import { HUDPuzzleEditorControls } from "../hud/parts/puzzle_editor_controls";
|
||||
|
||||
/** @typedef {{
|
||||
* shape: string,
|
||||
@ -516,12 +517,13 @@ export class RegularGameMode extends GameMode {
|
||||
constructor(root) {
|
||||
super(root);
|
||||
|
||||
this.hiddenHurtParts = {
|
||||
this.hiddenHudParts = {
|
||||
[HUDModeMenuBack.name]: false,
|
||||
[HUDPuzzleReview.name]: false,
|
||||
[HUDModeMenu.name]: false,
|
||||
[HUDModeSettings.name]: false,
|
||||
[HUDPuzzleDLCLogo.name]: false,
|
||||
[HUDPuzzleEditorControls.name]: false,
|
||||
};
|
||||
|
||||
this.hiddenBuildings = [MetaConstantProducerBuilding, MetaGoalAcceptorBuilding];
|
||||
|
Loading…
Reference in New Issue
Block a user