Merge pull request #511 from argonui/playermat-hider

Playermat Hider: intercept clicks and hide token pools
This commit is contained in:
Entrox-Licher 2023-12-18 17:05:21 -05:00 committed by GitHub
commit 3393001f95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 86 additions and 1 deletions

View File

@ -3,7 +3,6 @@
"ComponentTags_path": "ComponentTags.json",
"CustomUIAssets_path": "CustomUIAssets.json",
"DecalPallet_path": "DecalPallet.json",
"Decals": [],
"GameComplexity": "",
"GameMode": "Arkham Horror LCG - Super Complete Edition",
"GameType": "",
@ -172,6 +171,7 @@
"TokenSpawnTracker.e3ffc9",
"TokenSource.124381",
"GameData.3dbe47",
"PlayermatClickInterceptor.3dbe55",
"SCEDTour.0e5aa8",
"PlayerCards.2d30ee",
"TokenRemover.39b175",

View File

@ -0,0 +1,45 @@
{
"AltLookAngle": {
"x": 0,
"y": 0,
"z": 0
},
"Autoraise": true,
"ColorDiffuse": {
"b": 0,
"g": 0,
"r": 0
},
"Description": "This object is used to hide playmats beneath the table.",
"DragSelectable": true,
"GMNotes": "",
"GUID": "3dbe55",
"Grid": true,
"GridProjection": false,
"Hands": false,
"HideWhenFaceDown": false,
"IgnoreFoW": false,
"LayoutGroupSortIndex": 0,
"Locked": true,
"LuaScriptState": "false",
"LuaScript_path": "PlayermatClickInterceptor.3dbe55.ttslua",
"MeasureMovement": false,
"Name": "BlockSquare",
"Nickname": "PlayermatClickInterceptor",
"Snap": true,
"Sticky": true,
"Tooltip": false,
"Transform": {
"posX": -27.94,
"posY": -0.5,
"posZ": 0,
"rotX": 0,
"rotY": 270,
"rotZ": 0,
"scaleX": 84,
"scaleY": 1.5,
"scaleZ": 70
},
"Value": 0,
"XmlUI": ""
}

View File

@ -0,0 +1,15 @@
local interactable = false
function onSave() return JSON.encode(interactable) end
function onLoad(savedData)
if savedData and savedData ~= "" then
interactable = JSON.encode(savedData)
end
self.interactable = interactable
end
function setState(state)
interactable = state
self.interactable = interactable
end

View File

@ -17,4 +17,17 @@ function onClick_hideShow(player, matColor)
obj.setLock(pos.y > 0)
obj.setPosition(obj.getPosition() + Vector(0, mod, 0))
end
-- set state of interceptor block
local allMats = guidReferenceApi.getObjectsByType("Playermat")
local state = false
for owner, mat in pairs(allMats) do
if mat.getPosition().y < 0 then
state = true
break
end
end
local interceptor = getObjectFromGUID("3dbe55")
interceptor.call("setState", state)
end

View File

@ -30,9 +30,15 @@ local GuidReferences = {
HandZone = "0285cc",
HorrorCounter = "7b5729",
InvestigatorSkillTracker = "af7ed7",
PoolResources = "0168ae",
PoolDamage = "b0ef6c",
PoolHorror = "ae1a4e",
PoolClues = "fae2f6",
PoolDoom = "16724b",
Playermat = "383d8b",
ResourceCounter = "cd15ac",
TokenDiscardZone = "457de5",
TokenRemover = "2ba7a5",
Trash = "5f896a"
},
Red = {
@ -42,9 +48,15 @@ local GuidReferences = {
HandZone = "be2f17",
HorrorCounter = "beb964",
InvestigatorSkillTracker = "e74881",
PoolResources = "fd617a",
PoolDamage = "93f4a0",
PoolHorror = "7bd2a0",
PoolClues = "3b2550",
PoolDoom = "16fcd6",
Playermat = "0840d5",
ResourceCounter = "a4b60d",
TokenDiscardZone = "457de6",
TokenRemover = "39b175",
Trash = "4b8594"
},
Mythos = {