mirror of
https://github.com/tobspr/shapez.io.git
synced 2025-06-13 13:04:03 +00:00
Changed name of setting to "abortPlacementOnDeletion".
This commit is contained in:
parent
58ce3bcff3
commit
b8bc895906
@ -131,12 +131,12 @@ export class HUDBuildingPlacer extends BaseHUDPart {
|
|||||||
if (
|
if (
|
||||||
button === enumMouseButton.right &&
|
button === enumMouseButton.right &&
|
||||||
(!this.currentMetaBuilding.get() ||
|
(!this.currentMetaBuilding.get() ||
|
||||||
this.root.app.settings.getSetting("deletingDoesntClearCursor"))
|
!this.root.app.settings.getSetting("abortPlacementOnDeletion"))
|
||||||
) {
|
) {
|
||||||
this.currentlyDragging = true;
|
this.currentlyDragging = true;
|
||||||
this.currentlyDeleting = true;
|
this.currentlyDeleting = true;
|
||||||
this.lastDragTile = this.root.camera.screenToWorld(pos).toTileSpace();
|
this.lastDragTile = this.root.camera.screenToWorld(pos).toTileSpace();
|
||||||
if (!this.root.app.settings.getSetting("deletingDoesntClearCursor")) {
|
if (this.root.app.settings.getSetting("abortPlacementOnDeletion")) {
|
||||||
this.currentMetaBuilding.set(null);
|
this.currentMetaBuilding.set(null);
|
||||||
}
|
}
|
||||||
return STOP_PROPAGATION;
|
return STOP_PROPAGATION;
|
||||||
@ -305,9 +305,9 @@ export class HUDBuildingPlacer extends BaseHUDPart {
|
|||||||
this.buildingInfoElements.tutorialImage.setAttribute(
|
this.buildingInfoElements.tutorialImage.setAttribute(
|
||||||
"data-icon",
|
"data-icon",
|
||||||
"building_tutorials/" +
|
"building_tutorials/" +
|
||||||
metaBuilding.getId() +
|
metaBuilding.getId() +
|
||||||
(variant === defaultBuildingVariant ? "" : "-" + variant) +
|
(variant === defaultBuildingVariant ? "" : "-" + variant) +
|
||||||
".png"
|
".png"
|
||||||
);
|
);
|
||||||
|
|
||||||
removeAllChildren(this.buildingInfoElements.additionalInfo);
|
removeAllChildren(this.buildingInfoElements.additionalInfo);
|
||||||
@ -345,10 +345,10 @@ export class HUDBuildingPlacer extends BaseHUDPart {
|
|||||||
T.ingame.buildingPlacement.cycleBuildingVariants.replace(
|
T.ingame.buildingPlacement.cycleBuildingVariants.replace(
|
||||||
"<key>",
|
"<key>",
|
||||||
"<code class='keybinding'>" +
|
"<code class='keybinding'>" +
|
||||||
this.root.keyMapper
|
this.root.keyMapper
|
||||||
.getBinding(KEYMAPPINGS.placement.cycleBuildingVariants)
|
.getBinding(KEYMAPPINGS.placement.cycleBuildingVariants)
|
||||||
.getKeyCodeString() +
|
.getKeyCodeString() +
|
||||||
"</code>"
|
"</code>"
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -443,7 +443,7 @@ export class HUDBuildingPlacer extends BaseHUDPart {
|
|||||||
if (cancelAction) {
|
if (cancelAction) {
|
||||||
if (
|
if (
|
||||||
this.currentMetaBuilding.get() &&
|
this.currentMetaBuilding.get() &&
|
||||||
!this.root.app.settings.getSetting("deletingDoesntClearCursor")
|
this.root.app.settings.getSetting("abortPlacementOnDeletion")
|
||||||
) {
|
) {
|
||||||
this.currentMetaBuilding.set(null);
|
this.currentMetaBuilding.set(null);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -111,13 +111,13 @@ export const allApplicationSettings = [
|
|||||||
textGetter: rate => rate + " Hz",
|
textGetter: rate => rate + " Hz",
|
||||||
category: categoryGame,
|
category: categoryGame,
|
||||||
restartRequired: false,
|
restartRequired: false,
|
||||||
changeCb: (app, id) => {},
|
changeCb: (app, id) => { },
|
||||||
enabled: !IS_DEMO,
|
enabled: !IS_DEMO,
|
||||||
}),
|
}),
|
||||||
|
|
||||||
new BoolSetting("alwaysMultiplace", categoryGame, (app, value) => {}),
|
new BoolSetting("alwaysMultiplace", categoryGame, (app, value) => { }),
|
||||||
new BoolSetting("deletingDoesntClearCursor", categoryGame, (app, value) => {}),
|
new BoolSetting("abortPlacementOnDeletion", categoryGame, (app, value) => { }),
|
||||||
new BoolSetting("offerHints", categoryGame, (app, value) => {}),
|
new BoolSetting("offerHints", categoryGame, (app, value) => { }),
|
||||||
];
|
];
|
||||||
|
|
||||||
export function getApplicationSettingById(id) {
|
export function getApplicationSettingById(id) {
|
||||||
@ -135,7 +135,7 @@ class SettingsStorage {
|
|||||||
this.refreshRate = "60";
|
this.refreshRate = "60";
|
||||||
|
|
||||||
this.alwaysMultiplace = false;
|
this.alwaysMultiplace = false;
|
||||||
this.deletingDoesntClearCursor = false;
|
this.abortPlacementOnDeletion = true;
|
||||||
this.offerHints = true;
|
this.offerHints = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -318,7 +318,7 @@ export class ApplicationSettings extends ReadWriteProxy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (data.version < 8) {
|
if (data.version < 8) {
|
||||||
data.settings.deletingDoesntClearCursor = false;
|
data.settings.abortPlacementOnDeletion = true;
|
||||||
data.version = 8;
|
data.version = 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -542,10 +542,10 @@ settings:
|
|||||||
description: >-
|
description: >-
|
||||||
If enabled, all buildings will stay selected after placement until you cancel it. This is equivalent to holding SHIFT permanently.
|
If enabled, all buildings will stay selected after placement until you cancel it. This is equivalent to holding SHIFT permanently.
|
||||||
|
|
||||||
deletingDoesntClearCursor:
|
abortPlacementOnDeletion:
|
||||||
title: Deleting doesn't clear cursor
|
title: Abort Placement on Deletion
|
||||||
description: >-
|
description: >-
|
||||||
If enabled, buildings will stay selected when you are deleting objects, until you manually cancel it.
|
If enabled, building placement will be aborted whenever you try to delete a building.
|
||||||
|
|
||||||
offerHints:
|
offerHints:
|
||||||
title: Hints & Tutorials
|
title: Hints & Tutorials
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user