mirror of
https://github.com/tobspr/shapez.io.git
synced 2024-10-27 20:34:29 +00:00
Add multiplace setting
This commit is contained in:
parent
714332a91d
commit
1561246dc4
Binary file not shown.
@ -468,7 +468,11 @@ export class HUDBuildingPlacer extends BaseHUDPart {
|
||||
this.currentBaseRotation = (180 + this.currentBaseRotation) % 360;
|
||||
}
|
||||
|
||||
if (!metaBuilding.getStayInPlacementMode() && !this.root.app.inputMgr.shiftIsDown) {
|
||||
if (
|
||||
!metaBuilding.getStayInPlacementMode() &&
|
||||
!this.root.app.inputMgr.shiftIsDown &&
|
||||
!this.root.app.settings.getAllSettings().alwaysMultiplace
|
||||
) {
|
||||
// Stop placement
|
||||
this.currentMetaBuilding.set(null);
|
||||
}
|
||||
|
@ -111,13 +111,11 @@ export const allApplicationSettings = [
|
||||
textGetter: rate => rate + " Hz",
|
||||
category: categoryGame,
|
||||
restartRequired: false,
|
||||
changeCb:
|
||||
/**
|
||||
* @param {Application} app
|
||||
*/
|
||||
(app, id) => {},
|
||||
changeCb: (app, id) => {},
|
||||
enabled: !IS_DEMO,
|
||||
}),
|
||||
|
||||
new BoolSetting("alwaysMultiplace", categoryGame, (app, value) => {}),
|
||||
];
|
||||
|
||||
export function getApplicationSettingById(id) {
|
||||
@ -134,6 +132,8 @@ class SettingsStorage {
|
||||
this.theme = "light";
|
||||
this.refreshRate = "60";
|
||||
|
||||
this.alwaysMultiplace = false;
|
||||
|
||||
/**
|
||||
* @type {Object.<string, number>}
|
||||
*/
|
||||
@ -291,14 +291,20 @@ export class ApplicationSettings extends ReadWriteProxy {
|
||||
}
|
||||
|
||||
getCurrentVersion() {
|
||||
return 5;
|
||||
return 6;
|
||||
}
|
||||
|
||||
migrate(data) {
|
||||
// Simply reset
|
||||
if (data.version < this.getCurrentVersion()) {
|
||||
// Simply reset before
|
||||
if (data.version < 5) {
|
||||
data.settings = new SettingsStorage();
|
||||
data.version = this.getCurrentVersion();
|
||||
return ExplainedResult.good();
|
||||
}
|
||||
|
||||
if (data.version < 6) {
|
||||
data.alwaysMultiplace = false;
|
||||
data.version = 6;
|
||||
}
|
||||
|
||||
return ExplainedResult.good();
|
||||
|
@ -472,6 +472,11 @@ settings:
|
||||
description: >-
|
||||
If you have a 144hz monitor, change the refresh rate here so the game will properly simulate at higher refresh rates. This might actually decrease the FPS if your computer is too slow.
|
||||
|
||||
alwaysMultiplace:
|
||||
title: Multiplace
|
||||
description: >-
|
||||
If enabled, all buildings will stay selected after placement until you cancel it. This is equivalent to holding SHIFT permanently.
|
||||
|
||||
keybindings:
|
||||
title: Keybindings
|
||||
hint: >-
|
||||
|
Loading…
Reference in New Issue
Block a user