From ca3b61c19ca8e3295e9da215d1d190652860c837 Mon Sep 17 00:00:00 2001 From: Fen Dweller Date: Sun, 14 Nov 2021 08:18:44 -0500 Subject: [PATCH] Add a separate ground-snapping option This used to be controlled by the y-axis-lock setting. --- macrovision.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/macrovision.js b/macrovision.js index 6ed3492e..00d7a86b 100644 --- a/macrovision.js +++ b/macrovision.js @@ -507,7 +507,7 @@ function constrainRel(coords) { function snapPos(coords) { return { 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": { name: "Axis Spacing", desc: "How frequent the axis lines are",