Просмотр исходного кода

Add a separate ground-snapping option

This used to be controlled by the y-axis-lock setting.
master
Fen Dweller 4 лет назад
Родитель
Сommit
ca3b61c19c
1 измененных файлов: 13 добавлений и 1 удалений
  1. +13
    -1
      macrovision.js

+ 13
- 1
macrovision.js Просмотреть файл

@@ -507,7 +507,7 @@ function constrainRel(coords) {
function snapPos(coords) { function snapPos(coords) {
return { return {
x: coords.x, x: coords.x,
y: (!config.lockYAxis || altHeld) ? coords.y : (Math.abs(coords.y) < config.height.toNumber("meters")/20 ? 0 : coords.y)
y: (!config.groundSnap || altHeld) ? coords.y : (Math.abs(coords.y) < config.height.toNumber("meters")/20 ? 0 : coords.y)
}; };
} }


@@ -2673,6 +2673,18 @@ const settingsData = {
} }
} }
}, },
"ground-snap": {
name: "Snap to Ground",
desc: "Snap things to the ground",
type: "toggle",
default: true,
get value() {
return config.groundSnap;
},
set value(param) {
config.groundSnap = param;
}
},
"axis-spacing": { "axis-spacing": {
name: "Axis Spacing", name: "Axis Spacing",
desc: "How frequent the axis lines are", desc: "How frequent the axis lines are",


Загрузка…
Отмена
Сохранить