mirror of
https://github.com/tobspr/shapez.io.git
synced 2024-10-27 20:34:29 +00:00
Added setting to be able to delete buildings while placing, closes #45
This commit is contained in:
parent
389ce28e7a
commit
e6b5f8d2ed
@ -14,7 +14,9 @@ export const CHANGELOG = [
|
||||
"Zoom towards mouse cursor (by Dimava)",
|
||||
"Added multiple settings to optimize the performance",
|
||||
"Updated the soundtrack again, it is now 40 minutes in total!",
|
||||
"Added a button to the statistics dialog to disable the sorting (by squeek502)",
|
||||
"Updated and added new translations (Thanks to all contributors!)",
|
||||
"Added setting to be able to delete buildings while placing (inspired by hexy)",
|
||||
"Allow editing waypoints (by isaisstillalive)",
|
||||
"Show confirmation when cutting area which is too expensive to get pasted again (by isaisstillalive)",
|
||||
"Show mouse and camera tile on debug overlay (F4) (by dengr)",
|
||||
|
@ -641,7 +641,10 @@ export class HUDBuildingPlacerLogic extends BaseHUDPart {
|
||||
}
|
||||
|
||||
// Deletion
|
||||
if (button === enumMouseButton.right && !metaBuilding) {
|
||||
if (
|
||||
button === enumMouseButton.right &&
|
||||
(!metaBuilding || !this.root.app.settings.getAllSettings().clearCursorOnDeleteWhilePlacing)
|
||||
) {
|
||||
this.currentlyDragging = true;
|
||||
this.currentlyDeleting = true;
|
||||
this.lastDragTile = this.root.camera.screenToWorld(pos).toTileSpace();
|
||||
|
@ -243,6 +243,7 @@ export const allApplicationSettings = [
|
||||
}),
|
||||
|
||||
new BoolSetting("alwaysMultiplace", enumCategories.advanced, (app, value) => {}),
|
||||
new BoolSetting("clearCursorOnDeleteWhilePlacing", enumCategories.advanced, (app, value) => {}),
|
||||
new BoolSetting("enableTunnelSmartplace", enumCategories.advanced, (app, value) => {}),
|
||||
new BoolSetting("vignette", enumCategories.userInterface, (app, value) => {}),
|
||||
new BoolSetting("compactBuildingInfo", enumCategories.userInterface, (app, value) => {}),
|
||||
@ -289,6 +290,7 @@ class SettingsStorage {
|
||||
this.compactBuildingInfo = false;
|
||||
this.disableCutDeleteWarnings = false;
|
||||
this.rotationByBuilding = true;
|
||||
this.clearCursorOnDeleteWhilePlacing = true;
|
||||
|
||||
this.enableColorBlindHelper = false;
|
||||
|
||||
@ -495,7 +497,7 @@ export class ApplicationSettings extends ReadWriteProxy {
|
||||
}
|
||||
|
||||
getCurrentVersion() {
|
||||
return 21;
|
||||
return 22;
|
||||
}
|
||||
|
||||
/** @param {{settings: SettingsStorage, version: number}} data */
|
||||
@ -588,6 +590,11 @@ export class ApplicationSettings extends ReadWriteProxy {
|
||||
data.version = 21;
|
||||
}
|
||||
|
||||
if (data.version < 22) {
|
||||
data.settings.clearCursorOnDeleteWhilePlacing = true;
|
||||
data.version = 22;
|
||||
}
|
||||
|
||||
return ExplainedResult.good();
|
||||
}
|
||||
}
|
||||
|
@ -841,6 +841,11 @@ settings:
|
||||
description: >-
|
||||
Disabling the tile grid can help with the performance. This also makes the game look cleaner!
|
||||
|
||||
clearCursorOnDeleteWhilePlacing:
|
||||
title: Clear Cursor on Right Click
|
||||
description: >-
|
||||
Enabled by default, clears the cursor whenever you right click while you have a building selected for placement. If disabled, you can delete buildings by right-clicking while placing a building.
|
||||
|
||||
lowQualityTextures:
|
||||
title: Low quality textures (Ugly)
|
||||
description: >-
|
||||
|
Loading…
Reference in New Issue
Block a user