mirror of
https://github.com/tobspr/shapez.io.git
synced 2024-10-27 20:34:29 +00:00
Add setting to disable cut/delete dialogs.
This commit is contained in:
parent
bef7d823cd
commit
5d601a94be
@ -70,7 +70,10 @@ export class HUDMassSelector extends BaseHUDPart {
|
||||
}
|
||||
|
||||
confirmDelete() {
|
||||
if (this.selectedUids.size > 100) {
|
||||
if (
|
||||
!this.root.app.settings.getAllSettings().disableCutDeleteWarnings &&
|
||||
this.selectedUids.size > 100
|
||||
) {
|
||||
const { ok } = this.root.hud.parts.dialogs.showWarning(
|
||||
T.dialogs.massDeleteConfirm.title,
|
||||
T.dialogs.massDeleteConfirm.desc.replace(
|
||||
@ -120,7 +123,10 @@ export class HUDMassSelector extends BaseHUDPart {
|
||||
T.dialogs.blueprintsNotUnlocked.title,
|
||||
T.dialogs.blueprintsNotUnlocked.desc
|
||||
);
|
||||
} else if (this.selectedUids.size > 100) {
|
||||
} else if (
|
||||
!this.root.app.settings.getAllSettings().disableCutDeleteWarnings &&
|
||||
this.selectedUids.size > 100
|
||||
) {
|
||||
const { ok } = this.root.hud.parts.dialogs.showWarning(
|
||||
T.dialogs.massCutConfirm.title,
|
||||
T.dialogs.massCutConfirm.desc.replace(
|
||||
|
@ -201,6 +201,7 @@ export const allApplicationSettings = [
|
||||
new BoolSetting("enableTunnelSmartplace", categoryGame, (app, value) => {}),
|
||||
new BoolSetting("vignette", categoryGame, (app, value) => {}),
|
||||
new BoolSetting("compactBuildingInfo", categoryGame, (app, value) => {}),
|
||||
new BoolSetting("disableCutDeleteWarnings", categoryGame, (app, value) => {}),
|
||||
];
|
||||
|
||||
export function getApplicationSettingById(id) {
|
||||
@ -225,6 +226,7 @@ class SettingsStorage {
|
||||
this.enableTunnelSmartplace = true;
|
||||
this.vignette = true;
|
||||
this.compactBuildingInfo = false;
|
||||
this.disableCutDeleteWarnings = false;
|
||||
|
||||
/**
|
||||
* @type {Object.<string, number>}
|
||||
@ -414,7 +416,7 @@ export class ApplicationSettings extends ReadWriteProxy {
|
||||
}
|
||||
|
||||
getCurrentVersion() {
|
||||
return 13;
|
||||
return 14;
|
||||
}
|
||||
|
||||
/** @param {{settings: SettingsStorage, version: number}} data */
|
||||
@ -466,6 +468,10 @@ export class ApplicationSettings extends ReadWriteProxy {
|
||||
data.version = 13;
|
||||
}
|
||||
|
||||
if (data.version < 14) {
|
||||
data.settings.disableCutDeleteWarnings = false;
|
||||
data.version = 14;
|
||||
}
|
||||
return ExplainedResult.good();
|
||||
}
|
||||
}
|
||||
|
@ -692,6 +692,11 @@ settings:
|
||||
description: >-
|
||||
Shortens info boxes for buildings by only showing their ratios. Otherwise a description and image is shown.
|
||||
|
||||
disableCutDeleteWarnings:
|
||||
title: Disable Cut/Delete Warnings
|
||||
description: >-
|
||||
Disable the warning dialogs brought up when cutting/deleting more than 100 entities.
|
||||
|
||||
keybindings:
|
||||
title: Keybindings
|
||||
hint: >-
|
||||
|
Loading…
Reference in New Issue
Block a user