From b5d07312084668c1272f39b6e773927870037060 Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Mon, 2 Jan 2023 11:53:29 +0100 Subject: [PATCH 1/3] initial commit --- modsettings/SnapPoints.json | 440 ----------- .../Custom_Tile.7234af.json | 3 + objects/Playarea.721ba2.json | 694 ++++++++++++++++++ src/core/Global.ttslua | 7 + src/core/PlayArea.ttslua | 53 ++ src/core/PlayAreaApi.ttslua | 7 + xml/OptionPanel.xml | 14 + 7 files changed, 778 insertions(+), 440 deletions(-) diff --git a/modsettings/SnapPoints.json b/modsettings/SnapPoints.json index 11cad351..de68106b 100644 --- a/modsettings/SnapPoints.json +++ b/modsettings/SnapPoints.json @@ -56,446 +56,6 @@ "z": 0 } }, - { - "Position": { - "x": -43.37, - "y": 1.647, - "z": 15.19 - }, - "Rotation": { - "x": 0, - "y": 270, - "z": 0 - } - }, - { - "Position": { - "x": -43.37, - "y": 1.644, - "z": 7.57 - }, - "Rotation": { - "x": 0, - "y": 270, - "z": 0 - } - }, - { - "Position": { - "x": -43.37, - "y": 1.642, - "z": -0.03 - }, - "Rotation": { - "x": 0, - "y": 270, - "z": 0 - } - }, - { - "Position": { - "x": -43.37, - "y": 1.64, - "z": -7.7 - }, - "Rotation": { - "x": 0, - "y": 270, - "z": 0 - } - }, - { - "Position": { - "x": -43.37, - "y": 1.638, - "z": -15.28 - }, - "Rotation": { - "x": 0, - "y": 270, - "z": 0 - } - }, - { - "Position": { - "x": -36.773, - "y": 1.629, - "z": -15.28 - }, - "Rotation": { - "x": 0, - "y": 270, - "z": 0 - } - }, - { - "Position": { - "x": -36.773, - "y": 1.631, - "z": -7.7 - }, - "Rotation": { - "x": 0, - "y": 270, - "z": 0 - } - }, - { - "Position": { - "x": -36.773, - "y": 1.633, - "z": -0.03 - }, - "Rotation": { - "x": 0, - "y": 270, - "z": 0 - } - }, - { - "Position": { - "x": -36.773, - "y": 1.635, - "z": 7.57 - }, - "Rotation": { - "x": 0, - "y": 270, - "z": 0 - } - }, - { - "Position": { - "x": -36.773, - "y": 1.638, - "z": 15.19 - }, - "Rotation": { - "x": 0, - "y": 270, - "z": 0 - } - }, - { - "Position": { - "x": -30.224, - "y": 1.628, - "z": 15.19 - }, - "Rotation": { - "x": 0, - "y": 270, - "z": 0 - } - }, - { - "Position": { - "x": -30.224, - "y": 1.626, - "z": 7.57 - }, - "Rotation": { - "x": 0, - "y": 270, - "z": 0 - } - }, - { - "Position": { - "x": -30.224, - "y": 1.624, - "z": -0.03 - }, - "Rotation": { - "x": 0, - "y": 270, - "z": 0 - } - }, - { - "Position": { - "x": -30.224, - "y": 1.622, - "z": -7.7 - }, - "Rotation": { - "x": 0, - "y": 270, - "z": 0 - } - }, - { - "Position": { - "x": -30.224, - "y": 1.62, - "z": -15.28 - }, - "Rotation": { - "x": 0, - "y": 270, - "z": 0 - } - }, - { - "Position": { - "x": -23.677, - "y": 1.61, - "z": -15.28 - }, - "Rotation": { - "x": 0, - "y": 270, - "z": 0 - } - }, - { - "Position": { - "x": -23.677, - "y": 1.613, - "z": -7.7 - }, - "Rotation": { - "x": 0, - "y": 270, - "z": 0 - } - }, - { - "Position": { - "x": -23.677, - "y": 1.615, - "z": -0.03 - }, - "Rotation": { - "x": 0, - "y": 270, - "z": 0 - } - }, - { - "Position": { - "x": -23.677, - "y": 1.617, - "z": 7.57 - }, - "Rotation": { - "x": 0, - "y": 270, - "z": 0 - } - }, - { - "Position": { - "x": -23.677, - "y": 1.619, - "z": 15.19 - }, - "Rotation": { - "x": 0, - "y": 270, - "z": 0 - } - }, - { - "Position": { - "x": -17.12, - "y": 1.611, - "z": 15.19 - }, - "Rotation": { - "x": 0, - "y": 270, - "z": 0 - } - }, - { - "Position": { - "x": -17.12, - "y": 1.608, - "z": 7.57 - }, - "Rotation": { - "x": 0, - "y": 270, - "z": 0 - } - }, - { - "Position": { - "x": -17.12, - "y": 1.606, - "z": -0.03 - }, - "Rotation": { - "x": 0, - "y": 270, - "z": 0 - } - }, - { - "Position": { - "x": -17.12, - "y": 1.603, - "z": -7.7 - }, - "Rotation": { - "x": 0, - "y": 270, - "z": 0 - } - }, - { - "Position": { - "x": -17.12, - "y": 1.602, - "z": -15.28 - }, - "Rotation": { - "x": 0, - "y": 270, - "z": 0 - } - }, - { - "Position": { - "x": -43.37, - "y": 1.645, - "z": 11.46 - } - }, - { - "Position": { - "x": -43.37, - "y": 1.643, - "z": 3.86 - } - }, - { - "Position": { - "x": -43.37, - "y": 1.641, - "z": -3.83 - } - }, - { - "Position": { - "x": -43.37, - "y": 1.639, - "z": -11.51 - } - }, - { - "Position": { - "x": -36.773, - "y": 1.631, - "z": -11.51 - } - }, - { - "Position": { - "x": -36.773, - "y": 1.632, - "z": -3.83 - } - }, - { - "Position": { - "x": -36.773, - "y": 1.634, - "z": 3.86 - } - }, - { - "Position": { - "x": -36.773, - "y": 1.636, - "z": 11.46 - } - }, - { - "Position": { - "x": -30.224, - "y": 1.626, - "z": 11.46 - } - }, - { - "Position": { - "x": -30.224, - "y": 1.625, - "z": 3.86 - } - }, - { - "Position": { - "x": -30.224, - "y": 1.623, - "z": -3.83 - } - }, - { - "Position": { - "x": -30.224, - "y": 1.621, - "z": -11.51 - } - }, - { - "Position": { - "x": -23.677, - "y": 1.612, - "z": -11.51 - } - }, - { - "Position": { - "x": -23.677, - "y": 1.614, - "z": -3.83 - } - }, - { - "Position": { - "x": -23.677, - "y": 1.616, - "z": 3.86 - } - }, - { - "Position": { - "x": -23.677, - "y": 1.619, - "z": 11.46 - } - }, - { - "Position": { - "x": -17.12, - "y": 1.609, - "z": 11.46 - } - }, - { - "Position": { - "x": -17.12, - "y": 1.607, - "z": 3.86 - } - }, - { - "Position": { - "x": -17.12, - "y": 1.605, - "z": -3.83 - } - }, - { - "Position": { - "x": -17.12, - "y": 1.603, - "z": -11.51 - } - }, { "Position": { "x": 22.951, diff --git a/objects/Connectionmarkers.170f10/Custom_Tile.7234af.json b/objects/Connectionmarkers.170f10/Custom_Tile.7234af.json index 98f1e8f3..94463f6d 100644 --- a/objects/Connectionmarkers.170f10/Custom_Tile.7234af.json +++ b/objects/Connectionmarkers.170f10/Custom_Tile.7234af.json @@ -156,6 +156,9 @@ } }, "Sticky": true, + "Tags": [ + "Location" + ], "Tooltip": true, "Transform": { "posX": -50.369, diff --git a/objects/Playarea.721ba2.json b/objects/Playarea.721ba2.json index 17f0b18f..2ce861e3 100644 --- a/objects/Playarea.721ba2.json +++ b/objects/Playarea.721ba2.json @@ -4,6 +4,700 @@ "y": 0, "z": 0 }, + "AttachedSnapPoints": [ + { + "Position": { + "x": 1.53, + "y": 0.1, + "z": -1.09 + }, + "Rotation": { + "x": 0, + "y": 0, + "z": 0 + } + }, + { + "Position": { + "x": 1.53, + "y": 0.1, + "z": -0.76 + } + }, + { + "Position": { + "x": 1.53, + "y": 0.1, + "z": -0.43 + }, + "Rotation": { + "x": 0, + "y": 0, + "z": 0 + } + }, + { + "Position": { + "x": 1.53, + "y": 0.1, + "z": -0.1 + } + }, + { + "Position": { + "x": 1.53, + "y": 0.1, + "z": 0.23 + }, + "Rotation": { + "x": 0, + "y": 0, + "z": 0 + } + }, + { + "Position": { + "x": 1.53, + "y": 0.1, + "z": 0.56 + } + }, + { + "Position": { + "x": 1.53, + "y": 0.1, + "z": 0.89 + }, + "Rotation": { + "x": 0, + "y": 0, + "z": 0 + } + }, + { + "Position": { + "x": 1.53, + "y": 0.1, + "z": 1.22 + } + }, + { + "Position": { + "x": 1.53, + "y": 0.1, + "z": 1.55 + }, + "Rotation": { + "x": 0, + "y": 0, + "z": 0 + } + }, + { + "Position": { + "x": 1.148, + "y": 0.1, + "z": -1.09 + } + }, + { + "Position": { + "x": 1.148, + "y": 0.1, + "z": -0.76 + } + }, + { + "Position": { + "x": 1.148, + "y": 0.1, + "z": -0.43 + } + }, + { + "Position": { + "x": 1.148, + "y": 0.1, + "z": -0.1 + } + }, + { + "Position": { + "x": 1.148, + "y": 0.1, + "z": 0.23 + } + }, + { + "Position": { + "x": 1.148, + "y": 0.1, + "z": 0.56 + } + }, + { + "Position": { + "x": 1.148, + "y": 0.1, + "z": 0.89 + } + }, + { + "Position": { + "x": 1.148, + "y": 0.1, + "z": 1.22 + } + }, + { + "Position": { + "x": 1.148, + "y": 0.1, + "z": 1.55 + } + }, + { + "Position": { + "x": 0.765, + "y": 0.1, + "z": -1.09 + }, + "Rotation": { + "x": 0, + "y": 0, + "z": 0 + } + }, + { + "Position": { + "x": 0.765, + "y": 0.1, + "z": -0.76 + } + }, + { + "Position": { + "x": 0.765, + "y": 0.1, + "z": -0.43 + }, + "Rotation": { + "x": 0, + "y": 0, + "z": 0 + } + }, + { + "Position": { + "x": 0.765, + "y": 0.1, + "z": -0.1 + } + }, + { + "Position": { + "x": 0.765, + "y": 0.1, + "z": 0.23 + }, + "Rotation": { + "x": 0, + "y": 0, + "z": 0 + } + }, + { + "Position": { + "x": 0.765, + "y": 0.1, + "z": 0.56 + } + }, + { + "Position": { + "x": 0.765, + "y": 0.1, + "z": 0.89 + }, + "Rotation": { + "x": 0, + "y": 0, + "z": 0 + } + }, + { + "Position": { + "x": 0.765, + "y": 0.1, + "z": 1.22 + } + }, + { + "Position": { + "x": 0.765, + "y": 0.1, + "z": 1.55 + }, + "Rotation": { + "x": 0, + "y": 0, + "z": 0 + } + }, + { + "Position": { + "x": 0.383, + "y": 0.1, + "z": -1.09 + } + }, + { + "Position": { + "x": 0.383, + "y": 0.1, + "z": -0.76 + } + }, + { + "Position": { + "x": 0.383, + "y": 0.1, + "z": -0.43 + } + }, + { + "Position": { + "x": 0.383, + "y": 0.1, + "z": -0.1 + } + }, + { + "Position": { + "x": 0.383, + "y": 0.1, + "z": 0.23 + } + }, + { + "Position": { + "x": 0.383, + "y": 0.1, + "z": 0.56 + } + }, + { + "Position": { + "x": 0.383, + "y": 0.1, + "z": 0.89 + } + }, + { + "Position": { + "x": 0.383, + "y": 0.1, + "z": 1.22 + } + }, + { + "Position": { + "x": 0.383, + "y": 0.1, + "z": 1.55 + } + }, + { + "Position": { + "x": 0, + "y": 0.1, + "z": -1.09 + }, + "Rotation": { + "x": 0, + "y": 0, + "z": 0 + } + }, + { + "Position": { + "x": 0, + "y": 0.1, + "z": -0.76 + } + }, + { + "Position": { + "x": 0, + "y": 0.1, + "z": -0.43 + }, + "Rotation": { + "x": 0, + "y": 0, + "z": 0 + } + }, + { + "Position": { + "x": 0, + "y": 0.1, + "z": -0.1 + } + }, + { + "Position": { + "x": 0, + "y": 0.1, + "z": 0.23 + }, + "Rotation": { + "x": 0, + "y": 0, + "z": 0 + } + }, + { + "Position": { + "x": 0, + "y": 0.1, + "z": 0.56 + } + }, + { + "Position": { + "x": 0, + "y": 0.1, + "z": 0.89 + }, + "Rotation": { + "x": 0, + "y": 0, + "z": 0 + } + }, + { + "Position": { + "x": 0, + "y": 0.1, + "z": 1.22 + } + }, + { + "Position": { + "x": 0, + "y": 0.1, + "z": 1.55 + }, + "Rotation": { + "x": 0, + "y": 0, + "z": 0 + } + }, + { + "Position": { + "x": -0.383, + "y": 0.1, + "z": -1.09 + } + }, + { + "Position": { + "x": -0.383, + "y": 0.1, + "z": -0.76 + } + }, + { + "Position": { + "x": -0.383, + "y": 0.1, + "z": -0.43 + } + }, + { + "Position": { + "x": -0.383, + "y": 0.1, + "z": -0.1 + } + }, + { + "Position": { + "x": -0.383, + "y": 0.1, + "z": 0.23 + } + }, + { + "Position": { + "x": -0.383, + "y": 0.1, + "z": 0.56 + } + }, + { + "Position": { + "x": -0.383, + "y": 0.1, + "z": 0.89 + } + }, + { + "Position": { + "x": -0.383, + "y": 0.1, + "z": 1.22 + } + }, + { + "Position": { + "x": -0.383, + "y": 0.1, + "z": 1.55 + } + }, + { + "Position": { + "x": -0.765, + "y": 0.1, + "z": -1.09 + }, + "Rotation": { + "x": 0, + "y": 0, + "z": 0 + } + }, + { + "Position": { + "x": -0.765, + "y": 0.1, + "z": -0.76 + } + }, + { + "Position": { + "x": -0.765, + "y": 0.1, + "z": -0.43 + }, + "Rotation": { + "x": 0, + "y": 0, + "z": 0 + } + }, + { + "Position": { + "x": -0.765, + "y": 0.1, + "z": -0.1 + } + }, + { + "Position": { + "x": -0.765, + "y": 0.1, + "z": 0.23 + }, + "Rotation": { + "x": 0, + "y": 0, + "z": 0 + } + }, + { + "Position": { + "x": -0.765, + "y": 0.1, + "z": 0.56 + } + }, + { + "Position": { + "x": -0.765, + "y": 0.1, + "z": 0.89 + }, + "Rotation": { + "x": 0, + "y": 0, + "z": 0 + } + }, + { + "Position": { + "x": -0.765, + "y": 0.1, + "z": 1.22 + } + }, + { + "Position": { + "x": -0.765, + "y": 0.1, + "z": 1.55 + }, + "Rotation": { + "x": 0, + "y": 0, + "z": 0 + } + }, + { + "Position": { + "x": -1.148, + "y": 0.1, + "z": -1.09 + } + }, + { + "Position": { + "x": -1.148, + "y": 0.1, + "z": -0.76 + } + }, + { + "Position": { + "x": -1.148, + "y": 0.1, + "z": -0.43 + } + }, + { + "Position": { + "x": -1.148, + "y": 0.1, + "z": -0.1 + } + }, + { + "Position": { + "x": -1.148, + "y": 0.1, + "z": 0.23 + } + }, + { + "Position": { + "x": -1.148, + "y": 0.1, + "z": 0.56 + } + }, + { + "Position": { + "x": -1.148, + "y": 0.1, + "z": 0.89 + } + }, + { + "Position": { + "x": -1.148, + "y": 0.1, + "z": 1.22 + } + }, + { + "Position": { + "x": -1.148, + "y": 0.1, + "z": 1.55 + } + }, + { + "Position": { + "x": -1.53, + "y": 0.1, + "z": -1.09 + }, + "Rotation": { + "x": 0, + "y": 0, + "z": 0 + } + }, + { + "Position": { + "x": -1.53, + "y": 0.1, + "z": -0.76 + } + }, + { + "Position": { + "x": -1.53, + "y": 0.1, + "z": -0.43 + }, + "Rotation": { + "x": 0, + "y": 0, + "z": 0 + } + }, + { + "Position": { + "x": -1.53, + "y": 0.1, + "z": -0.1 + } + }, + { + "Position": { + "x": -1.53, + "y": 0.1, + "z": 0.23 + }, + "Rotation": { + "x": 0, + "y": 0, + "z": 0 + } + }, + { + "Position": { + "x": -1.53, + "y": 0.1, + "z": 0.56 + } + }, + { + "Position": { + "x": -1.53, + "y": 0.1, + "z": 0.89 + }, + "Rotation": { + "x": 0, + "y": 0, + "z": 0 + } + }, + { + "Position": { + "x": -1.53, + "y": 0.1, + "z": 1.22 + } + }, + { + "Position": { + "x": -1.53, + "y": 0.1, + "z": 1.55 + }, + "Rotation": { + "x": 0, + "y": 0, + "z": 0 + } + } + ], "Autoraise": true, "ColorDiffuse": { "b": 1, diff --git a/src/core/Global.ttslua b/src/core/Global.ttslua index c6e3321c..c5ff4d35 100644 --- a/src/core/Global.ttslua +++ b/src/core/Global.ttslua @@ -36,6 +36,7 @@ local IS_RESHUFFLING = false local bagSearchers = {} local hideTitleSplashWaitFunctionId = nil local playmatAPI = require("playermat/PlaymatApi") +local playAreaAPI = require("core/PlayAreaApi") --------------------------------------------------------- -- data for tokens @@ -819,6 +820,11 @@ function applyOptionPanelChange(id, state) -- update master clue counter getObjectFromGUID("4a3aa4").setVar("useClickableCounters", state) + -- option: Draw 1 button + elseif id == "PlayAreaSnapTags" then + playAreaAPI.setLimitSnapsByType(state) + optionPanel[id] = state + -- option: Show Title on placing scenarios elseif id == "showTitleSplash" then optionPanel[id] = state @@ -945,6 +951,7 @@ function onClick_defaultSettings() -- clean reset of variable optionPanel = { useSnapTags = true, + PlayAreaSnapTags = false, showDrawButton = false, useClueClickers = false, showTitleSplash = true, diff --git a/src/core/PlayArea.ttslua b/src/core/PlayArea.ttslua index 3fa91628..4397dbc1 100644 --- a/src/core/PlayArea.ttslua +++ b/src/core/PlayArea.ttslua @@ -443,3 +443,56 @@ end function showLocationLinks() return not LOC_LINK_EXCLUDE_SCENARIOS[currentScenario] end + +-- Sets this playmat's snap points to limit snapping to locations or not. +-- If matchTypes is false, snap points will be reset to snap all cards. +---@param matchTypes Boolean Whether snap points should only snap for the matching card types. +function setLimitSnapsByType(matchTypes) + local snaps = self.getSnapPoints() + for i, snap in ipairs(snaps) do + local snapTags = snaps[i].tags + if matchTypes then + if snapTags == nil then + snaps[i].tags = { "Location" } + else + table.insert(snaps[i].tags, "Location") + end + else + snaps[i].tags = nil + end + end + self.setSnapPoints(snaps) +end + +-- rebuilds local snap points (could be useful in the future again) +function buildSnaps() + local upperleft = { x = 1.53, z = -1.09} + local lowerright = {x = -1.53, z = 1.55} + local snaps = {} + + -- creates 81 snap points, for uneven rows + columns it makes a rotation snap point + for i = 1, 9 do + for j = 1, 9 do + local snap = {} + snap.position = {} + snap.position.x = round(upperleft.x - (upperleft.x - lowerright.x) * (i - 1) / 8, 3) + snap.position.y = 0.1 + snap.position.z = round(upperleft.z - (upperleft.z - lowerright.z) * (j - 1) / 8, 3) + + -- enable rotation snaps for uneven rows / columns + if (i % 2 ~= 0) and (j % 2 ~= 0) then + snap.rotation = {0, 0, 0} + snap.rotation_snap = true + end + + table.insert(snaps, snap) + end + end + self.setSnapPoints(snaps) +end + +-- utility function +function round(num, numDecimalPlaces) + local mult = 10^(numDecimalPlaces or 0) + return math.floor(num * mult + 0.5) / mult +end diff --git a/src/core/PlayAreaApi.ttslua b/src/core/PlayAreaApi.ttslua index 49e54769..157cc600 100644 --- a/src/core/PlayAreaApi.ttslua +++ b/src/core/PlayAreaApi.ttslua @@ -41,5 +41,12 @@ do getObjectFromGUID(PLAY_AREA_GUID).call("onScenarioChanged", scenarioName) end + -- Sets this playmat's snap points to limit snapping to locations or not. + -- If matchTypes is false, snap points will be reset to snap all cards. + ---@param matchTypes Boolean Whether snap points should only snap for the matching card types. + PlayAreaApi.setLimitSnapsByType = function(matchCardTypes) + getObjectFromGUID(PLAY_AREA_GUID).call("setLimitSnapsByType", matchCardTypes) + end + return PlayAreaApi end diff --git a/xml/OptionPanel.xml b/xml/OptionPanel.xml index c63c85d9..bb47ea38 100644 --- a/xml/OptionPanel.xml +++ b/xml/OptionPanel.xml @@ -142,6 +142,20 @@ + + + + + Enable snap tags for play area + Only cards with the tag "Location" will snap (official cards are supported by default). Disable this if you are having issues with custom content. + + + + + + + From 707b977efcfa69fb71419a56e6fa7c48acc52f49 Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Tue, 3 Jan 2023 23:04:59 +0100 Subject: [PATCH 2/3] resolving comments --- src/core/Global.ttslua | 6 +++--- xml/OptionPanel.xml | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/core/Global.ttslua b/src/core/Global.ttslua index c5ff4d35..c14db1ae 100644 --- a/src/core/Global.ttslua +++ b/src/core/Global.ttslua @@ -820,8 +820,8 @@ function applyOptionPanelChange(id, state) -- update master clue counter getObjectFromGUID("4a3aa4").setVar("useClickableCounters", state) - -- option: Draw 1 button - elseif id == "PlayAreaSnapTags" then + -- option: Play area snap tags + elseif id == "playAreaSnapTags" then playAreaAPI.setLimitSnapsByType(state) optionPanel[id] = state @@ -951,7 +951,7 @@ function onClick_defaultSettings() -- clean reset of variable optionPanel = { useSnapTags = true, - PlayAreaSnapTags = false, + playAreaSnapTags = false, showDrawButton = false, useClueClickers = false, showTitleSplash = true, diff --git a/xml/OptionPanel.xml b/xml/OptionPanel.xml index bb47ea38..3f236c07 100644 --- a/xml/OptionPanel.xml +++ b/xml/OptionPanel.xml @@ -151,8 +151,8 @@ - + From 568d28ac1b7637412af37ea53d5ecd59f0d3e1a0 Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Wed, 4 Jan 2023 00:45:48 +0100 Subject: [PATCH 3/3] enable play area snaps by default --- objects/LuaScriptState.luascriptstate | 2 +- objects/Playarea.721ba2.json | 407 ++++++++++++++++++++------ src/core/Global.ttslua | 2 +- 3 files changed, 327 insertions(+), 84 deletions(-) diff --git a/objects/LuaScriptState.luascriptstate b/objects/LuaScriptState.luascriptstate index 080f8272..7ab578b2 100644 --- a/objects/LuaScriptState.luascriptstate +++ b/objects/LuaScriptState.luascriptstate @@ -1 +1 @@ -{"optionPanel":{"showChaosBagManager":false,"showCleanUpHelper":false,"showDrawButton":false,"showHandHelper":[],"showNavigationOverlay":false,"showTokenArranger":false,"useClueClickers":false,"useSnapTags":true,"showTitleSplash":true}} +{"optionPanel":{"playAreaSnapTags":true,"showChaosBagManager":false,"showCleanUpHelper":false,"showDrawButton":false,"showHandHelper":[],"showNavigationOverlay":false,"showTitleSplash":true,"showTokenArranger":false,"useClueClickers":false,"useSnapTags":true}} diff --git a/objects/Playarea.721ba2.json b/objects/Playarea.721ba2.json index 2ce861e3..2b316818 100644 --- a/objects/Playarea.721ba2.json +++ b/objects/Playarea.721ba2.json @@ -15,14 +15,20 @@ "x": 0, "y": 0, "z": 0 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { "x": 1.53, "y": 0.1, "z": -0.76 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { @@ -34,14 +40,20 @@ "x": 0, "y": 0, "z": 0 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { "x": 1.53, "y": 0.1, "z": -0.1 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { @@ -53,14 +65,20 @@ "x": 0, "y": 0, "z": 0 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { "x": 1.53, "y": 0.1, "z": 0.56 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { @@ -72,14 +90,20 @@ "x": 0, "y": 0, "z": 0 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { "x": 1.53, "y": 0.1, "z": 1.22 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { @@ -91,70 +115,100 @@ "x": 0, "y": 0, "z": 0 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { "x": 1.148, "y": 0.1, "z": -1.09 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { "x": 1.148, "y": 0.1, "z": -0.76 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { "x": 1.148, "y": 0.1, "z": -0.43 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { "x": 1.148, "y": 0.1, "z": -0.1 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { "x": 1.148, "y": 0.1, "z": 0.23 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { "x": 1.148, "y": 0.1, "z": 0.56 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { "x": 1.148, "y": 0.1, "z": 0.89 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { "x": 1.148, "y": 0.1, "z": 1.22 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { "x": 1.148, "y": 0.1, "z": 1.55 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { @@ -166,14 +220,20 @@ "x": 0, "y": 0, "z": 0 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { "x": 0.765, "y": 0.1, "z": -0.76 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { @@ -185,14 +245,20 @@ "x": 0, "y": 0, "z": 0 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { "x": 0.765, "y": 0.1, "z": -0.1 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { @@ -204,14 +270,20 @@ "x": 0, "y": 0, "z": 0 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { "x": 0.765, "y": 0.1, "z": 0.56 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { @@ -223,14 +295,20 @@ "x": 0, "y": 0, "z": 0 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { "x": 0.765, "y": 0.1, "z": 1.22 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { @@ -242,70 +320,100 @@ "x": 0, "y": 0, "z": 0 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { "x": 0.383, "y": 0.1, "z": -1.09 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { "x": 0.383, "y": 0.1, "z": -0.76 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { "x": 0.383, "y": 0.1, "z": -0.43 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { "x": 0.383, "y": 0.1, "z": -0.1 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { "x": 0.383, "y": 0.1, "z": 0.23 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { "x": 0.383, "y": 0.1, "z": 0.56 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { "x": 0.383, "y": 0.1, "z": 0.89 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { "x": 0.383, "y": 0.1, "z": 1.22 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { "x": 0.383, "y": 0.1, "z": 1.55 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { @@ -317,14 +425,20 @@ "x": 0, "y": 0, "z": 0 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { "x": 0, "y": 0.1, "z": -0.76 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { @@ -336,14 +450,20 @@ "x": 0, "y": 0, "z": 0 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { "x": 0, "y": 0.1, "z": -0.1 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { @@ -355,14 +475,20 @@ "x": 0, "y": 0, "z": 0 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { "x": 0, "y": 0.1, "z": 0.56 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { @@ -374,14 +500,20 @@ "x": 0, "y": 0, "z": 0 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { "x": 0, "y": 0.1, "z": 1.22 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { @@ -393,70 +525,100 @@ "x": 0, "y": 0, "z": 0 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { "x": -0.383, "y": 0.1, "z": -1.09 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { "x": -0.383, "y": 0.1, "z": -0.76 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { "x": -0.383, "y": 0.1, "z": -0.43 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { "x": -0.383, "y": 0.1, "z": -0.1 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { "x": -0.383, "y": 0.1, "z": 0.23 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { "x": -0.383, "y": 0.1, "z": 0.56 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { "x": -0.383, "y": 0.1, "z": 0.89 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { "x": -0.383, "y": 0.1, "z": 1.22 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { "x": -0.383, "y": 0.1, "z": 1.55 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { @@ -468,14 +630,20 @@ "x": 0, "y": 0, "z": 0 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { "x": -0.765, "y": 0.1, "z": -0.76 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { @@ -487,14 +655,20 @@ "x": 0, "y": 0, "z": 0 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { "x": -0.765, "y": 0.1, "z": -0.1 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { @@ -506,14 +680,20 @@ "x": 0, "y": 0, "z": 0 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { "x": -0.765, "y": 0.1, "z": 0.56 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { @@ -525,14 +705,20 @@ "x": 0, "y": 0, "z": 0 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { "x": -0.765, "y": 0.1, "z": 1.22 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { @@ -544,70 +730,100 @@ "x": 0, "y": 0, "z": 0 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { "x": -1.148, "y": 0.1, "z": -1.09 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { "x": -1.148, "y": 0.1, "z": -0.76 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { "x": -1.148, "y": 0.1, "z": -0.43 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { "x": -1.148, "y": 0.1, "z": -0.1 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { "x": -1.148, "y": 0.1, "z": 0.23 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { "x": -1.148, "y": 0.1, "z": 0.56 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { "x": -1.148, "y": 0.1, "z": 0.89 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { "x": -1.148, "y": 0.1, "z": 1.22 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { "x": -1.148, "y": 0.1, "z": 1.55 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { @@ -619,14 +835,20 @@ "x": 0, "y": 0, "z": 0 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { "x": -1.53, "y": 0.1, "z": -0.76 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { @@ -638,14 +860,20 @@ "x": 0, "y": 0, "z": 0 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { "x": -1.53, "y": 0.1, "z": -0.1 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { @@ -657,14 +885,20 @@ "x": 0, "y": 0, "z": 0 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { "x": -1.53, "y": 0.1, "z": 0.56 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { @@ -676,14 +910,20 @@ "x": 0, "y": 0, "z": 0 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { "x": -1.53, "y": 0.1, "z": 1.22 - } + }, + "Tags": [ + "Location" + ] }, { "Position": { @@ -695,7 +935,10 @@ "x": 0, "y": 0, "z": 0 - } + }, + "Tags": [ + "Location" + ] } ], "Autoraise": true, @@ -728,7 +971,7 @@ "LayoutGroupSortIndex": 0, "Locked": true, "LuaScript": "require(\"core/PlayArea\")", - "LuaScriptState": "[]", + "LuaScriptState": "{\"trackedLocations\":[]}", "MeasureMovement": false, "Name": "Custom_Token", "Nickname": "Playarea", diff --git a/src/core/Global.ttslua b/src/core/Global.ttslua index c14db1ae..77e0975d 100644 --- a/src/core/Global.ttslua +++ b/src/core/Global.ttslua @@ -951,7 +951,7 @@ function onClick_defaultSettings() -- clean reset of variable optionPanel = { useSnapTags = true, - playAreaSnapTags = false, + playAreaSnapTags = true, showDrawButton = false, useClueClickers = false, showTitleSplash = true,