From a0e069c23339e31d9da167351ad94b6c8ed27210 Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Wed, 12 Apr 2023 10:25:50 +0200 Subject: [PATCH] moving threat area down --- objects/Playermat1White.8b081b.json | 28 ++++++++++++++-------------- objects/Playermat2Orange.bd0ff4.json | 28 ++++++++++++++-------------- objects/Playermat3Green.383d8b.json | 28 ++++++++++++++-------------- objects/Playermat4Red.0840d5.json | 28 ++++++++++++++-------------- src/playermat/Playmat.ttslua | 19 ++++++++----------- 5 files changed, 64 insertions(+), 67 deletions(-) diff --git a/objects/Playermat1White.8b081b.json b/objects/Playermat1White.8b081b.json index 9cb68266..0cd532bf 100644 --- a/objects/Playermat1White.8b081b.json +++ b/objects/Playermat1White.8b081b.json @@ -231,9 +231,9 @@ }, { "Position": { - "x": 1.38, + "x": 1.365, "y": 0.1, - "z": -0.645 + "z": -0.625 }, "Rotation": { "x": 0, @@ -243,9 +243,9 @@ }, { "Position": { - "x": 0.92, + "x": 0.91, "y": 0.1, - "z": -0.645 + "z": -0.625 }, "Rotation": { "x": 0, @@ -255,9 +255,9 @@ }, { "Position": { - "x": 0.46, + "x": 0.455, "y": 0.1, - "z": -0.645 + "z": -0.625 }, "Rotation": { "x": 0, @@ -269,7 +269,7 @@ "Position": { "x": 0, "y": 0.1, - "z": -0.645 + "z": -0.625 }, "Rotation": { "x": 0, @@ -279,9 +279,9 @@ }, { "Position": { - "x": -0.46, + "x": -0.455, "y": 0.1, - "z": -0.645 + "z": -0.625 }, "Rotation": { "x": 0, @@ -291,9 +291,9 @@ }, { "Position": { - "x": -0.92, + "x": -0.91, "y": 0.1, - "z": -0.645 + "z": -0.625 }, "Rotation": { "x": 0, @@ -303,9 +303,9 @@ }, { "Position": { - "x": -1.38, + "x": -1.365, "y": 0.1, - "z": -0.645 + "z": -0.625 }, "Rotation": { "x": 0, @@ -329,7 +329,7 @@ }, "ImageScalar": 1, "ImageSecondaryURL": "", - "ImageURL": "http://cloud-3.steamusercontent.com/ugc/1859438430150777205/4ED2E0BC2A2C4728DA5E155C06AF1BA1FCB00D3B/", + "ImageURL": "http://cloud-3.steamusercontent.com/ugc/2037357630681963618/E7271737B19CE0BFAAA382BEEEF497FE3E06ECC1/", "WidthScale": 0 }, "Description": "", diff --git a/objects/Playermat2Orange.bd0ff4.json b/objects/Playermat2Orange.bd0ff4.json index 3a6e632e..ccc4720a 100644 --- a/objects/Playermat2Orange.bd0ff4.json +++ b/objects/Playermat2Orange.bd0ff4.json @@ -231,9 +231,9 @@ }, { "Position": { - "x": 1.38, + "x": 1.365, "y": 0.1, - "z": -0.645 + "z": -0.625 }, "Rotation": { "x": 0, @@ -243,9 +243,9 @@ }, { "Position": { - "x": 0.92, + "x": 0.91, "y": 0.1, - "z": -0.645 + "z": -0.625 }, "Rotation": { "x": 0, @@ -255,9 +255,9 @@ }, { "Position": { - "x": 0.46, + "x": 0.455, "y": 0.1, - "z": -0.645 + "z": -0.625 }, "Rotation": { "x": 0, @@ -269,7 +269,7 @@ "Position": { "x": 0, "y": 0.1, - "z": -0.645 + "z": -0.625 }, "Rotation": { "x": 0, @@ -279,9 +279,9 @@ }, { "Position": { - "x": -0.46, + "x": -0.455, "y": 0.1, - "z": -0.645 + "z": -0.625 }, "Rotation": { "x": 0, @@ -291,9 +291,9 @@ }, { "Position": { - "x": -0.92, + "x": -0.91, "y": 0.1, - "z": -0.645 + "z": -0.625 }, "Rotation": { "x": 0, @@ -303,9 +303,9 @@ }, { "Position": { - "x": -1.38, + "x": -1.365, "y": 0.1, - "z": -0.645 + "z": -0.625 }, "Rotation": { "x": 0, @@ -329,7 +329,7 @@ }, "ImageScalar": 1, "ImageSecondaryURL": "", - "ImageURL": "http://cloud-3.steamusercontent.com/ugc/1859438430150777205/4ED2E0BC2A2C4728DA5E155C06AF1BA1FCB00D3B/", + "ImageURL": "http://cloud-3.steamusercontent.com/ugc/2037357630681963618/E7271737B19CE0BFAAA382BEEEF497FE3E06ECC1/", "WidthScale": 0 }, "Description": "", diff --git a/objects/Playermat3Green.383d8b.json b/objects/Playermat3Green.383d8b.json index 97962ae6..82f2760f 100644 --- a/objects/Playermat3Green.383d8b.json +++ b/objects/Playermat3Green.383d8b.json @@ -231,9 +231,9 @@ }, { "Position": { - "x": 1.38, + "x": 1.365, "y": 0.1, - "z": -0.645 + "z": -0.625 }, "Rotation": { "x": 0, @@ -243,9 +243,9 @@ }, { "Position": { - "x": 0.92, + "x": 0.91, "y": 0.1, - "z": -0.645 + "z": -0.625 }, "Rotation": { "x": 0, @@ -255,9 +255,9 @@ }, { "Position": { - "x": 0.46, + "x": 0.455, "y": 0.1, - "z": -0.645 + "z": -0.625 }, "Rotation": { "x": 0, @@ -269,7 +269,7 @@ "Position": { "x": 0, "y": 0.1, - "z": -0.645 + "z": -0.625 }, "Rotation": { "x": 0, @@ -279,9 +279,9 @@ }, { "Position": { - "x": -0.46, + "x": -0.455, "y": 0.1, - "z": -0.645 + "z": -0.625 }, "Rotation": { "x": 0, @@ -291,9 +291,9 @@ }, { "Position": { - "x": -0.92, + "x": -0.91, "y": 0.1, - "z": -0.645 + "z": -0.625 }, "Rotation": { "x": 0, @@ -303,9 +303,9 @@ }, { "Position": { - "x": -1.38, + "x": -1.365, "y": 0.1, - "z": -0.645 + "z": -0.625 }, "Rotation": { "x": 0, @@ -329,7 +329,7 @@ }, "ImageScalar": 1, "ImageSecondaryURL": "", - "ImageURL": "http://cloud-3.steamusercontent.com/ugc/1859438430150777205/4ED2E0BC2A2C4728DA5E155C06AF1BA1FCB00D3B/", + "ImageURL": "http://cloud-3.steamusercontent.com/ugc/2037357630681963618/E7271737B19CE0BFAAA382BEEEF497FE3E06ECC1/", "WidthScale": 0 }, "Description": "", diff --git a/objects/Playermat4Red.0840d5.json b/objects/Playermat4Red.0840d5.json index 0daca64a..aeb7a709 100644 --- a/objects/Playermat4Red.0840d5.json +++ b/objects/Playermat4Red.0840d5.json @@ -231,9 +231,9 @@ }, { "Position": { - "x": 1.38, + "x": 1.365, "y": 0.1, - "z": -0.645 + "z": -0.625 }, "Rotation": { "x": 0, @@ -243,9 +243,9 @@ }, { "Position": { - "x": 0.92, + "x": 0.91, "y": 0.1, - "z": -0.645 + "z": -0.625 }, "Rotation": { "x": 0, @@ -255,9 +255,9 @@ }, { "Position": { - "x": 0.46, + "x": 0.455, "y": 0.1, - "z": -0.645 + "z": -0.625 }, "Rotation": { "x": 0, @@ -269,7 +269,7 @@ "Position": { "x": 0, "y": 0.1, - "z": -0.645 + "z": -0.625 }, "Rotation": { "x": 0, @@ -279,9 +279,9 @@ }, { "Position": { - "x": -0.46, + "x": -0.455, "y": 0.1, - "z": -0.645 + "z": -0.625 }, "Rotation": { "x": 0, @@ -291,9 +291,9 @@ }, { "Position": { - "x": -0.92, + "x": -0.91, "y": 0.1, - "z": -0.645 + "z": -0.625 }, "Rotation": { "x": 0, @@ -303,9 +303,9 @@ }, { "Position": { - "x": -1.38, + "x": -1.365, "y": 0.1, - "z": -0.645 + "z": -0.625 }, "Rotation": { "x": 0, @@ -329,7 +329,7 @@ }, "ImageScalar": 1, "ImageSecondaryURL": "", - "ImageURL": "http://cloud-3.steamusercontent.com/ugc/1859438430150777205/4ED2E0BC2A2C4728DA5E155C06AF1BA1FCB00D3B/", + "ImageURL": "http://cloud-3.steamusercontent.com/ugc/2037357630681963618/E7271737B19CE0BFAAA382BEEEF497FE3E06ECC1/", "WidthScale": 0 }, "Description": "", diff --git a/src/playermat/Playmat.ttslua b/src/playermat/Playmat.ttslua index 5a14b196..5e1225dc 100644 --- a/src/playermat/Playmat.ttslua +++ b/src/playermat/Playmat.ttslua @@ -8,17 +8,13 @@ local DEBUG = false local collisionEnabled = false -- position offsets relative to mat [x, y, z] -local DRAWN_ENCOUNTER_CARD_OFFSET = {1.365, 0.5, -0.635} -local DRAWN_CHAOS_TOKEN_OFFSET = {-1.55, 0.5, -0.58} -local DISCARD_BUTTON_OFFSETS = { - {-1.38, 0.1, -0.94}, - {-0.92, 0.1, -0.94}, - {-0.46, 0.1, -0.94}, - {0.00, 0.1, -0.94}, - {0.46, 0.1, -0.94}, - {0.92, 0.1, -0.94} -} +local DRAWN_ENCOUNTER_CARD_OFFSET = {1.365, 0.5, -0.625} +local DRAWN_CHAOS_TOKEN_OFFSET = {-1.55, 0.25, -0.58} +-- x-Values for discard buttons +local DISCARD_BUTTON_OFFSETS = {-1.365, -0.91, -0.455, 0, 0.455, 0.91} + +-- defined areas for the function "inArea()"" local MAIN_PLAY_AREA = { upperLeft = { x = 1.98, @@ -193,7 +189,8 @@ function makeDiscardHandlerFor(searchPosition, discardPosition) end -- build a discard button to discard from searchPosition to discardPosition (number must be unique) -function makeDiscardButton(position, discardPosition, number) +function makeDiscardButton(xValue, discardPosition, number) + local position = { xValue, 0.1, -0.94} local searchPosition = {-position[1], position[2], position[3] + 0.32} local handler = makeDiscardHandlerFor(searchPosition, discardPosition) local handlerName = 'handler' .. number