added click interceptor and references for pool resources

This commit is contained in:
Chr1Z93 2023-12-18 14:37:46 +01:00
parent 8732e438d5
commit 995503f245
5 changed files with 86 additions and 0 deletions

View File

@ -172,6 +172,7 @@
"TokenSpawnTracker.e3ffc9",
"TokenSource.124381",
"GameData.3dbe47",
"PlayermatClickInterceptor.3dbe55",
"SCEDTour.0e5aa8",
"PlayerCards.2d30ee",
"TokenRemover.39b175",

View File

@ -0,0 +1,45 @@
{
"GUID": "3dbe55",
"Name": "BlockSquare",
"Transform": {
"posX": -27.94,
"posY": -0.5,
"posZ": 0,
"rotX": 0,
"rotY": 270,
"rotZ": 0,
"scaleX": 84,
"scaleY": 1.5,
"scaleZ": 70
},
"Nickname": "PlayermatClickInterceptor",
"Description": "This object is used to hide playmats beneath the table.",
"GMNotes": "",
"AltLookAngle": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"ColorDiffuse": {
"r": 0.0,
"g": 0.0,
"b": 0.0
},
"LayoutGroupSortIndex": 0,
"Value": 0,
"Locked": true,
"Grid": true,
"Snap": true,
"IgnoreFoW": false,
"MeasureMovement": false,
"DragSelectable": true,
"Autoraise": true,
"Sticky": true,
"Tooltip": false,
"GridProjection": false,
"HideWhenFaceDown": false,
"Hands": false,
"LuaScriptState": "",
"LuaScript_path": "PlayermatClickInterceptor.3dbe55.ttslua",
"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,6 +17,19 @@ 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
function isActionToken(x) return x.getDescription() == 'Action Token' 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 = {