From 7296ba2038a76b14ebcf8fed0efcc6fe573f75e9 Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Sun, 31 Dec 2023 13:32:44 +0100 Subject: [PATCH 1/9] QoL update --- src/accessories/CleanUpHelper.ttslua | 3 +++ src/core/Global.ttslua | 1 - src/core/PlayArea.ttslua | 5 +++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/accessories/CleanUpHelper.ttslua b/src/accessories/CleanUpHelper.ttslua index 9c146992..022f9e2b 100644 --- a/src/accessories/CleanUpHelper.ttslua +++ b/src/accessories/CleanUpHelper.ttslua @@ -245,6 +245,9 @@ function tidyPlayareaCoroutine() local trash = guidReferenceApi.getObjectByOwnerAndType("Mythos", "Trash") local playAreaZone = guidReferenceApi.getObjectByOwnerAndType("Mythos", "PlayAreaZone") + -- reset the playarea image by not providing an image + playAreaApi.updateSurface() + if playAreaZone == nil then printToAll("Scripting zone for main play area could not be found!", "Red") elseif trash == nil then diff --git a/src/core/Global.ttslua b/src/core/Global.ttslua index 6ab57fbf..4313748c 100644 --- a/src/core/Global.ttslua +++ b/src/core/Global.ttslua @@ -20,7 +20,6 @@ ENCOUNTER_DECK_DISCARD_POSITION = { -3.85, 1, 10.38 } -- GUIDs that will not be interactable (e.g. parts of the table) local NOT_INTERACTABLE = { "6161b4", -- Decoration-Map - "721ba2", -- PlayArea "9f334f", -- MythosArea "463022", -- Panel behind tentacle stand "f182ee", -- InvestigatorCount diff --git a/src/core/PlayArea.ttslua b/src/core/PlayArea.ttslua index 1e3b67fa..dbd5781e 100644 --- a/src/core/PlayArea.ttslua +++ b/src/core/PlayArea.ttslua @@ -61,6 +61,7 @@ function onSave() end function onLoad(savedData) + self.interactable = false -- this needs to be here since the playarea will be reloaded when the image changes local loadedData = JSON.decode(savedData) or {} locations = loadedData.trackedLocations or {} currentScenario = loadedData.currentScenario @@ -84,10 +85,10 @@ function updateSurface(newURL) if newURL ~= "" and newURL ~= nil and newURL ~= DEFAULT_URL then customInfo.image = newURL - broadcastToAll("New Playmat Image Applied", { 0.2, 0.9, 0.2 }) + broadcastToAll("New Playarea Image Applied", { 0.2, 0.9, 0.2 }) else customInfo.image = DEFAULT_URL - broadcastToAll("Default Playmat Image Applied", { 0.2, 0.9, 0.2 }) + broadcastToAll("Default Playarea Image Applied", { 0.2, 0.9, 0.2 }) end self.setCustomObject(customInfo) From 20a24eb12c9efc5461729c490807de45039fb1ec Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Sun, 31 Dec 2023 13:41:53 +0100 Subject: [PATCH 2/9] fixed wrong bracket placement --- src/core/GameKeyHandler.ttslua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/GameKeyHandler.ttslua b/src/core/GameKeyHandler.ttslua index 6766a828..83e719b0 100644 --- a/src/core/GameKeyHandler.ttslua +++ b/src/core/GameKeyHandler.ttslua @@ -70,7 +70,7 @@ function discardObject(playerColor, hoveredObject) -- discard tokens / tiles on cards / decks if hoveredObject.type ~= "Tile" then - for _, obj in ipairs(searchLib.onObject(hoveredObject), "isTileOrToken") do + for _, obj in ipairs(searchLib.onObject(hoveredObject, "isTileOrToken")) do table.insert(discardTheseObjects, obj) end end From 40d07d5864cbd07d2146cc7ed60e3409ebd00c9e Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Mon, 1 Jan 2024 11:53:42 +0100 Subject: [PATCH 3/9] rehosted obj file from pastebin --- objects/OfficialStandaloneChallengeScenarios.0ef5c8.json | 2 +- objects/ReturntoTheCircleUndone.757324.json | 2 +- objects/ReturntoTheDunwichLegacy.ce9130.json | 2 +- objects/ReturntoTheForgottenAge.479ff3.json | 2 +- objects/ReturntoThePathtoCarcosa.e9889a.json | 2 +- objects/ReturntotheNightoftheZealot.56270d.json | 2 +- src/core/Global.ttslua | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/objects/OfficialStandaloneChallengeScenarios.0ef5c8.json b/objects/OfficialStandaloneChallengeScenarios.0ef5c8.json index 24a3cf87..a2bc84c9 100644 --- a/objects/OfficialStandaloneChallengeScenarios.0ef5c8.json +++ b/objects/OfficialStandaloneChallengeScenarios.0ef5c8.json @@ -34,7 +34,7 @@ }, "DiffuseURL": "http://cloud-3.steamusercontent.com/ugc/1758068588410895356/0B5F0CCD29DEC12514840D7B9CD2329B635A79A6/", "MaterialIndex": 3, - "MeshURL": "http://pastebin.com/raw.php?i=uWAmuNZ2", + "MeshURL": "http://cloud-3.steamusercontent.com/ugc/2278324073260846176/33EFCAF30567F8756F665BE5A2A6502E9C61C7F7/", "NormalURL": "", "TypeIndex": 6 }, diff --git a/objects/ReturntoTheCircleUndone.757324.json b/objects/ReturntoTheCircleUndone.757324.json index a851cdd1..68b75164 100644 --- a/objects/ReturntoTheCircleUndone.757324.json +++ b/objects/ReturntoTheCircleUndone.757324.json @@ -27,7 +27,7 @@ }, "DiffuseURL": "http://cloud-3.steamusercontent.com/ugc/1697277388086852852/6FD56D74FDDDA5626A3B72E788993EC651AD25E1/", "MaterialIndex": 3, - "MeshURL": "http://pastebin.com/raw.php?i=uWAmuNZ2", + "MeshURL": "http://cloud-3.steamusercontent.com/ugc/2278324073260846176/33EFCAF30567F8756F665BE5A2A6502E9C61C7F7/", "NormalURL": "", "TypeIndex": 0 }, diff --git a/objects/ReturntoTheDunwichLegacy.ce9130.json b/objects/ReturntoTheDunwichLegacy.ce9130.json index a7b19102..c84c7206 100644 --- a/objects/ReturntoTheDunwichLegacy.ce9130.json +++ b/objects/ReturntoTheDunwichLegacy.ce9130.json @@ -27,7 +27,7 @@ }, "DiffuseURL": "http://cloud-3.steamusercontent.com/ugc/762723517667592476/36D86649503A49A36AA97B7B72C6150E4C2BE333/", "MaterialIndex": 3, - "MeshURL": "http://pastebin.com/raw.php?i=uWAmuNZ2", + "MeshURL": "http://cloud-3.steamusercontent.com/ugc/2278324073260846176/33EFCAF30567F8756F665BE5A2A6502E9C61C7F7/", "NormalURL": "", "TypeIndex": 0 }, diff --git a/objects/ReturntoTheForgottenAge.479ff3.json b/objects/ReturntoTheForgottenAge.479ff3.json index 2a8144c0..68dfae46 100644 --- a/objects/ReturntoTheForgottenAge.479ff3.json +++ b/objects/ReturntoTheForgottenAge.479ff3.json @@ -27,7 +27,7 @@ }, "DiffuseURL": "http://cloud-3.steamusercontent.com/ugc/1474319121423613924/490D56D20C6AE0547D67D942513396E8D0584A4A/", "MaterialIndex": 3, - "MeshURL": "http://pastebin.com/raw.php?i=uWAmuNZ2", + "MeshURL": "http://cloud-3.steamusercontent.com/ugc/2278324073260846176/33EFCAF30567F8756F665BE5A2A6502E9C61C7F7/", "NormalURL": "", "TypeIndex": 0 }, diff --git a/objects/ReturntoThePathtoCarcosa.e9889a.json b/objects/ReturntoThePathtoCarcosa.e9889a.json index d01aa6e3..6a78c62d 100644 --- a/objects/ReturntoThePathtoCarcosa.e9889a.json +++ b/objects/ReturntoThePathtoCarcosa.e9889a.json @@ -27,7 +27,7 @@ }, "DiffuseURL": "http://cloud-3.steamusercontent.com/ugc/762723517667556656/9638E8CE7F209B50634B202C9EF4B0BDB4993BBB/", "MaterialIndex": 3, - "MeshURL": "http://pastebin.com/raw.php?i=uWAmuNZ2", + "MeshURL": "http://cloud-3.steamusercontent.com/ugc/2278324073260846176/33EFCAF30567F8756F665BE5A2A6502E9C61C7F7/", "NormalURL": "", "TypeIndex": 0 }, diff --git a/objects/ReturntotheNightoftheZealot.56270d.json b/objects/ReturntotheNightoftheZealot.56270d.json index 99fbed35..01368121 100644 --- a/objects/ReturntotheNightoftheZealot.56270d.json +++ b/objects/ReturntotheNightoftheZealot.56270d.json @@ -27,7 +27,7 @@ }, "DiffuseURL": "http://cloud-3.steamusercontent.com/ugc/762723517667598054/18C06F0F20D9D4651E6736FB609E2D41F4D1964E/", "MaterialIndex": 3, - "MeshURL": "http://pastebin.com/raw.php?i=uWAmuNZ2", + "MeshURL": "http://cloud-3.steamusercontent.com/ugc/2278324073260846176/33EFCAF30567F8756F665BE5A2A6502E9C61C7F7/", "NormalURL": "", "TypeIndex": 0 }, diff --git a/src/core/Global.ttslua b/src/core/Global.ttslua index 6ab57fbf..c4621e1e 100644 --- a/src/core/Global.ttslua +++ b/src/core/Global.ttslua @@ -834,7 +834,7 @@ function onClick_spawnPlaceholder() local meshTable = { big = "https://raw.githubusercontent.com/RobMayer/TTSLibrary/master/advboxes/core_h_MSH.obj", small = "https://raw.githubusercontent.com/RobMayer/TTSLibrary/master/advboxes/tuckbox_h_MSH.obj", - wide = "http://pastebin.com/raw.php?i=uWAmuNZ2" + wide = "http://cloud-3.steamusercontent.com/ugc/2278324073260846176/33EFCAF30567F8756F665BE5A2A6502E9C61C7F7/" } local scaleTable = { From 1c53c6a9dc0591e8acfbf231af61e501cfa96eb2 Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Mon, 1 Jan 2024 18:53:06 +0100 Subject: [PATCH 4/9] added parallel jack --- objects/AllPlayerCards.15bb07.json | 5 ++ .../BuriedSecrets.28080d.json | 2 +- .../BuriedSecrets.28080e.gmnotes | 8 +++ .../BuriedSecrets.28080e.json | 61 ++++++++++++++++++ .../MontereyJackParallel.46b146.gmnotes | 11 ++++ .../MontereyJackParallel.46b146.json | 62 +++++++++++++++++++ .../MontereyJackParallelBack.46b148.gmnotes | 11 ++++ .../MontereyJackParallelBack.46b148.json | 62 +++++++++++++++++++ .../MontereyJackParallelFront.46b147.gmnotes | 11 ++++ .../MontereyJackParallelFront.46b147.json | 62 +++++++++++++++++++ .../TrustyBullwhip.ca9a61.gmnotes | 12 ++++ .../TrustyBullwhip.ca9a61.json | 62 +++++++++++++++++++ src/playercards/PlayerCardPanelData.ttslua | 30 ++++----- 13 files changed, 383 insertions(+), 16 deletions(-) create mode 100644 objects/AllPlayerCards.15bb07/BuriedSecrets.28080e.gmnotes create mode 100644 objects/AllPlayerCards.15bb07/BuriedSecrets.28080e.json create mode 100644 objects/AllPlayerCards.15bb07/MontereyJackParallel.46b146.gmnotes create mode 100644 objects/AllPlayerCards.15bb07/MontereyJackParallel.46b146.json create mode 100644 objects/AllPlayerCards.15bb07/MontereyJackParallelBack.46b148.gmnotes create mode 100644 objects/AllPlayerCards.15bb07/MontereyJackParallelBack.46b148.json create mode 100644 objects/AllPlayerCards.15bb07/MontereyJackParallelFront.46b147.gmnotes create mode 100644 objects/AllPlayerCards.15bb07/MontereyJackParallelFront.46b147.json create mode 100644 objects/AllPlayerCards.15bb07/TrustyBullwhip.ca9a61.gmnotes create mode 100644 objects/AllPlayerCards.15bb07/TrustyBullwhip.ca9a61.json diff --git a/objects/AllPlayerCards.15bb07.json b/objects/AllPlayerCards.15bb07.json index 174b7f95..961bfd7f 100644 --- a/objects/AllPlayerCards.15bb07.json +++ b/objects/AllPlayerCards.15bb07.json @@ -23,6 +23,9 @@ "CharlieKane.4deeff", "FinnEdwards.dd40c0", "MontereyJack.46b145", + "MontereyJackParallel.46b146", + "MontereyJackParallelBack.46b148", + "MontereyJackParallelFront.46b147", "Ifitbleeds.acf2b0", "BeatCop2.7001be", "BookofLivingMyths.c5fb1f", @@ -1077,6 +1080,7 @@ "Discipline.3247da", "ShrewdDealings.c70129", "BuriedSecrets.28080d", + "BuriedSecrets.28080e", "MechanicsWrench.598ba0", "FendOff3.0c2449", "JointheCaravan1.6367dd", @@ -1224,6 +1228,7 @@ "TidalMemento.b4f9ee", "JacobMorrison3.aa38d0", "TrustyBullwhip.ca9a60", + "TrustyBullwhip.ca9a61", "MobGoons.fc1506", "GuardDog.001ae8", "FirstAid3.3c7eb1", diff --git a/objects/AllPlayerCards.15bb07/BuriedSecrets.28080d.json b/objects/AllPlayerCards.15bb07/BuriedSecrets.28080d.json index 9519d834..ef74edd2 100644 --- a/objects/AllPlayerCards.15bb07/BuriedSecrets.28080d.json +++ b/objects/AllPlayerCards.15bb07/BuriedSecrets.28080d.json @@ -22,7 +22,7 @@ "UniqueBack": false } }, - "Description": "Weakness", + "Description": "", "DragSelectable": true, "GMNotes_path": "AllPlayerCards.15bb07/BuriedSecrets.28080d.gmnotes", "GUID": "28080d", diff --git a/objects/AllPlayerCards.15bb07/BuriedSecrets.28080e.gmnotes b/objects/AllPlayerCards.15bb07/BuriedSecrets.28080e.gmnotes new file mode 100644 index 00000000..4cd4e0ef --- /dev/null +++ b/objects/AllPlayerCards.15bb07/BuriedSecrets.28080e.gmnotes @@ -0,0 +1,8 @@ +{ + "id": "90064", + "type": "Treachery", + "class": "Neutral", + "traits": "Mystery.", + "weakness": true, + "cycle": "Relics of the Past" +} diff --git a/objects/AllPlayerCards.15bb07/BuriedSecrets.28080e.json b/objects/AllPlayerCards.15bb07/BuriedSecrets.28080e.json new file mode 100644 index 00000000..9902422f --- /dev/null +++ b/objects/AllPlayerCards.15bb07/BuriedSecrets.28080e.json @@ -0,0 +1,61 @@ +{ + "AltLookAngle": { + "x": 0, + "y": 0, + "z": 0 + }, + "Autoraise": true, + "CardID": 13300, + "ColorDiffuse": { + "b": 0.71324, + "g": 0.71324, + "r": 0.71324 + }, + "CustomDeck": { + "133": { + "BackIsHidden": true, + "BackURL": "https://i.imgur.com/EcbhVuh.jpg/", + "FaceURL": "http://cloud-3.steamusercontent.com/ugc/2278324186517520416/34030F3F4E7DB48038BAC2BB6010D4781C102301/", + "NumHeight": 1, + "NumWidth": 1, + "Type": 0, + "UniqueBack": false + } + }, + "Description": "Advanced", + "DragSelectable": true, + "GMNotes_path": "AllPlayerCards.15bb07/BuriedSecrets.28080e.gmnotes", + "GUID": "28080e", + "Grid": true, + "GridProjection": false, + "Hands": true, + "HideWhenFaceDown": true, + "IgnoreFoW": false, + "LayoutGroupSortIndex": 0, + "Locked": false, + "LuaScript": "", + "LuaScriptState": "", + "MeasureMovement": false, + "Name": "CardCustom", + "Nickname": "Buried Secrets", + "SidewaysCard": false, + "Snap": true, + "Sticky": true, + "Tags": [ + "PlayerCard" + ], + "Tooltip": true, + "Transform": { + "posX": 9.202, + "posY": 2.672, + "posZ": -16.735, + "rotX": 0, + "rotY": 270, + "rotZ": 0, + "scaleX": 1, + "scaleY": 1, + "scaleZ": 1 + }, + "Value": 0, + "XmlUI": "" +} \ No newline at end of file diff --git a/objects/AllPlayerCards.15bb07/MontereyJackParallel.46b146.gmnotes b/objects/AllPlayerCards.15bb07/MontereyJackParallel.46b146.gmnotes new file mode 100644 index 00000000..900c9d8e --- /dev/null +++ b/objects/AllPlayerCards.15bb07/MontereyJackParallel.46b146.gmnotes @@ -0,0 +1,11 @@ +{ + "id": "08007-p", + "type": "Investigator", + "class": "Rogue", + "traits": "Wayfarer.", + "willpowerIcons": 1, + "intellectIcons": 4, + "combatIcons": 2, + "agilityIcons": 5, + "cycle": "Relics of the Past" +} diff --git a/objects/AllPlayerCards.15bb07/MontereyJackParallel.46b146.json b/objects/AllPlayerCards.15bb07/MontereyJackParallel.46b146.json new file mode 100644 index 00000000..ee41bd06 --- /dev/null +++ b/objects/AllPlayerCards.15bb07/MontereyJackParallel.46b146.json @@ -0,0 +1,62 @@ +{ + "AltLookAngle": { + "x": 0, + "y": 0, + "z": 0 + }, + "Autoraise": true, + "CardID": 13600, + "ColorDiffuse": { + "b": 0.71324, + "g": 0.71324, + "r": 0.71324 + }, + "CustomDeck": { + "136": { + "BackIsHidden": true, + "BackURL": "http://cloud-3.steamusercontent.com/ugc/2278324186517520738/82315ABC94958A349B8144CD56E5988E53BF2294/", + "FaceURL": "http://cloud-3.steamusercontent.com/ugc/2278324186517520906/D92C977B92A6B9CCBFB1EDF94ABE919BF22E0FD4/", + "NumHeight": 1, + "NumWidth": 1, + "Type": 0, + "UniqueBack": false + } + }, + "Description": "The Archeologist", + "DragSelectable": true, + "GMNotes_path": "AllPlayerCards.15bb07/MontereyJackParallel.46b146.gmnotes", + "GUID": "46b146", + "Grid": true, + "GridProjection": false, + "Hands": true, + "HideWhenFaceDown": false, + "IgnoreFoW": false, + "LayoutGroupSortIndex": 0, + "Locked": false, + "LuaScript": "", + "LuaScriptState": "", + "MeasureMovement": false, + "Name": "CardCustom", + "Nickname": "Monterey Jack (Parallel)", + "SidewaysCard": true, + "Snap": true, + "Sticky": true, + "Tags": [ + "Investigator", + "PlayerCard" + ], + "Tooltip": true, + "Transform": { + "posX": 53.274, + "posY": 3.137, + "posZ": 22.081, + "rotX": 0, + "rotY": 180, + "rotZ": 0, + "scaleX": 1.15, + "scaleY": 1, + "scaleZ": 1.15 + }, + "Value": 0, + "XmlUI": "" +} \ No newline at end of file diff --git a/objects/AllPlayerCards.15bb07/MontereyJackParallelBack.46b148.gmnotes b/objects/AllPlayerCards.15bb07/MontereyJackParallelBack.46b148.gmnotes new file mode 100644 index 00000000..3592c741 --- /dev/null +++ b/objects/AllPlayerCards.15bb07/MontereyJackParallelBack.46b148.gmnotes @@ -0,0 +1,11 @@ +{ + "id": "08007-pb", + "type": "Investigator", + "class": "Rogue", + "traits": "Wayfarer.", + "willpowerIcons": 1, + "intellectIcons": 4, + "combatIcons": 2, + "agilityIcons": 5, + "cycle": "Relics of the Past" +} diff --git a/objects/AllPlayerCards.15bb07/MontereyJackParallelBack.46b148.json b/objects/AllPlayerCards.15bb07/MontereyJackParallelBack.46b148.json new file mode 100644 index 00000000..f3117f03 --- /dev/null +++ b/objects/AllPlayerCards.15bb07/MontereyJackParallelBack.46b148.json @@ -0,0 +1,62 @@ +{ + "AltLookAngle": { + "x": 0, + "y": 0, + "z": 0 + }, + "Autoraise": true, + "CardID": 13800, + "ColorDiffuse": { + "b": 0.71324, + "g": 0.71324, + "r": 0.71324 + }, + "CustomDeck": { + "138": { + "BackIsHidden": true, + "BackURL": "http://cloud-3.steamusercontent.com/ugc/2278324186517520738/82315ABC94958A349B8144CD56E5988E53BF2294/", + "FaceURL": "http://cloud-3.steamusercontent.com/ugc/2278324186517531830/EC1E6D6443C07256771BE6E913FFF97949E8FB7D/", + "NumHeight": 1, + "NumWidth": 1, + "Type": 0, + "UniqueBack": false + } + }, + "Description": "The Archeologist", + "DragSelectable": true, + "GMNotes_path": "AllPlayerCards.15bb07/MontereyJackParallelBack.46b148.gmnotes", + "GUID": "46b148", + "Grid": true, + "GridProjection": false, + "Hands": true, + "HideWhenFaceDown": false, + "IgnoreFoW": false, + "LayoutGroupSortIndex": 0, + "Locked": false, + "LuaScript": "", + "LuaScriptState": "", + "MeasureMovement": false, + "Name": "CardCustom", + "Nickname": "Monterey Jack (Parallel Back)", + "SidewaysCard": true, + "Snap": true, + "Sticky": true, + "Tags": [ + "Investigator", + "PlayerCard" + ], + "Tooltip": true, + "Transform": { + "posX": 53.274, + "posY": 3.137, + "posZ": 22.081, + "rotX": 0, + "rotY": 180, + "rotZ": 0, + "scaleX": 1.15, + "scaleY": 1, + "scaleZ": 1.15 + }, + "Value": 0, + "XmlUI": "" +} \ No newline at end of file diff --git a/objects/AllPlayerCards.15bb07/MontereyJackParallelFront.46b147.gmnotes b/objects/AllPlayerCards.15bb07/MontereyJackParallelFront.46b147.gmnotes new file mode 100644 index 00000000..76ccc49b --- /dev/null +++ b/objects/AllPlayerCards.15bb07/MontereyJackParallelFront.46b147.gmnotes @@ -0,0 +1,11 @@ +{ + "id": "08007-pf", + "type": "Investigator", + "class": "Rogue", + "traits": "Wayfarer.", + "willpowerIcons": 1, + "intellectIcons": 4, + "combatIcons": 2, + "agilityIcons": 5, + "cycle": "Relics of the Past" +} diff --git a/objects/AllPlayerCards.15bb07/MontereyJackParallelFront.46b147.json b/objects/AllPlayerCards.15bb07/MontereyJackParallelFront.46b147.json new file mode 100644 index 00000000..232bb3ed --- /dev/null +++ b/objects/AllPlayerCards.15bb07/MontereyJackParallelFront.46b147.json @@ -0,0 +1,62 @@ +{ + "AltLookAngle": { + "x": 0, + "y": 0, + "z": 0 + }, + "Autoraise": true, + "CardID": 13700, + "ColorDiffuse": { + "b": 0.71324, + "g": 0.71324, + "r": 0.71324 + }, + "CustomDeck": { + "137": { + "BackIsHidden": true, + "BackURL": "http://cloud-3.steamusercontent.com/ugc/2278324186517531692/2F83981C724FECFD69619EFE558B675129FEE563/", + "FaceURL": "http://cloud-3.steamusercontent.com/ugc/2278324186517520906/D92C977B92A6B9CCBFB1EDF94ABE919BF22E0FD4/", + "NumHeight": 1, + "NumWidth": 1, + "Type": 0, + "UniqueBack": false + } + }, + "Description": "The Archeologist", + "DragSelectable": true, + "GMNotes_path": "AllPlayerCards.15bb07/MontereyJackParallelFront.46b147.gmnotes", + "GUID": "46b147", + "Grid": true, + "GridProjection": false, + "Hands": true, + "HideWhenFaceDown": false, + "IgnoreFoW": false, + "LayoutGroupSortIndex": 0, + "Locked": false, + "LuaScript": "", + "LuaScriptState": "", + "MeasureMovement": false, + "Name": "CardCustom", + "Nickname": "Monterey Jack (Parallel Front)", + "SidewaysCard": true, + "Snap": true, + "Sticky": true, + "Tags": [ + "Investigator", + "PlayerCard" + ], + "Tooltip": true, + "Transform": { + "posX": 53.274, + "posY": 3.137, + "posZ": 22.081, + "rotX": 0, + "rotY": 180, + "rotZ": 0, + "scaleX": 1.15, + "scaleY": 1, + "scaleZ": 1.15 + }, + "Value": 0, + "XmlUI": "" +} \ No newline at end of file diff --git a/objects/AllPlayerCards.15bb07/TrustyBullwhip.ca9a61.gmnotes b/objects/AllPlayerCards.15bb07/TrustyBullwhip.ca9a61.gmnotes new file mode 100644 index 00000000..1e63e602 --- /dev/null +++ b/objects/AllPlayerCards.15bb07/TrustyBullwhip.ca9a61.gmnotes @@ -0,0 +1,12 @@ +{ + "id": "90063", + "type": "Asset", + "slot": "Hand", + "class": "Neutral", + "cost": 1, + "traits": "Item. Weapon. Melee.", + "agilityIcons": 2, + "intellectIcons": 1, + "wildIcons": 1, + "cycle": "Relics of the Past" +} diff --git a/objects/AllPlayerCards.15bb07/TrustyBullwhip.ca9a61.json b/objects/AllPlayerCards.15bb07/TrustyBullwhip.ca9a61.json new file mode 100644 index 00000000..75cce435 --- /dev/null +++ b/objects/AllPlayerCards.15bb07/TrustyBullwhip.ca9a61.json @@ -0,0 +1,62 @@ +{ + "AltLookAngle": { + "x": 0, + "y": 0, + "z": 0 + }, + "Autoraise": true, + "CardID": 13400, + "ColorDiffuse": { + "b": 0.71324, + "g": 0.71324, + "r": 0.71324 + }, + "CustomDeck": { + "134": { + "BackIsHidden": true, + "BackURL": "https://i.imgur.com/EcbhVuh.jpg/", + "FaceURL": "http://cloud-3.steamusercontent.com/ugc/2278324186517520604/13B2733436FDBFFCAAF9BD76DFE053F96F559A7E/", + "NumHeight": 1, + "NumWidth": 1, + "Type": 0, + "UniqueBack": false + } + }, + "Description": "Advanced", + "DragSelectable": true, + "GMNotes_path": "AllPlayerCards.15bb07/TrustyBullwhip.ca9a61.gmnotes", + "GUID": "ca9a61", + "Grid": true, + "GridProjection": false, + "Hands": true, + "HideWhenFaceDown": true, + "IgnoreFoW": false, + "LayoutGroupSortIndex": 0, + "Locked": false, + "LuaScript": "", + "LuaScriptState": "", + "MeasureMovement": false, + "Name": "CardCustom", + "Nickname": "Trusty Bullwhip", + "SidewaysCard": false, + "Snap": true, + "Sticky": true, + "Tags": [ + "Asset", + "PlayerCard" + ], + "Tooltip": true, + "Transform": { + "posX": 78.563, + "posY": 3.327, + "posZ": 7.389, + "rotX": 0, + "rotY": 270, + "rotZ": 1, + "scaleX": 1, + "scaleY": 1, + "scaleZ": 1 + }, + "Value": 0, + "XmlUI": "" +} \ No newline at end of file diff --git a/src/playercards/PlayerCardPanelData.ttslua b/src/playercards/PlayerCardPanelData.ttslua index c2890197..4d3a781e 100644 --- a/src/playercards/PlayerCardPanelData.ttslua +++ b/src/playercards/PlayerCardPanelData.ttslua @@ -203,7 +203,7 @@ INVESTIGATOR_GROUPS = { } INVESTIGATORS = {} ---Core-- +-- Core Box INVESTIGATORS["Roland Banks"] = { cards = { "01001", "01001-p", "01001-pf", "01001-pb" }, minicards = { "01001-m" }, @@ -234,7 +234,7 @@ INVESTIGATORS["Wendy Adams"] = { signatures = { "01014", "01015", "01515", "90039", "90040", "90038" }, starterDeck = "2624949" } ---Dunwich-- +-- The Dunwich Legacy INVESTIGATORS["Zoey Samaras"] = { cards = { "02001", "02001-p", "02001-pf", "02001-pb" }, minicards = { "02001-m" }, @@ -265,7 +265,7 @@ INVESTIGATORS["\"Ashcan\" Pete"] = { signatures = { "02014", "02015", "90047", "90048" }, starterDeck = "2624969" } ---Carcosa-- +-- The Path to Carcosa INVESTIGATORS["Mark Harrigan"] = { cards = { "03001" }, minicards = { "03001-m" }, @@ -302,7 +302,7 @@ INVESTIGATORS["Lola Hayes"] = { signatures = { "03018", "03018", "03019", "03019", "03019-t", "03019-t" }, starterDeck = "2624990" } ---Forgotten-- +-- The Forgotten Age INVESTIGATORS["Leo Anderson"] = { cards = { "04001" }, minicards = { "04001-m" }, @@ -333,7 +333,7 @@ INVESTIGATORS["Calvin Wright"] = { signatures = { "04015", "04016" }, starterDeck = "2625007" } ---Circle-- +-- The Circle Undone INVESTIGATORS["Carolyn Fern"] = { cards = { "05001" }, minicards = { "05001-m" }, @@ -370,7 +370,7 @@ INVESTIGATORS["Marie Lambeau"] = { signatures = { "05018", "05019" }, starterDeck = "2626395" } ---Dream-- +-- The Dream-Eaters INVESTIGATORS["Tommy Muldoon"] = { cards = { "06001" }, minicards = { "06001-m" }, @@ -401,7 +401,7 @@ INVESTIGATORS["Patrice Hathaway"] = { signatures = { "06016", "06017" }, starterDeck = "2626461" } ---Starter-- +-- Starter Decks INVESTIGATORS["Nathaniel Cho"] = { cards = { "60101" }, minicards = { "60101-m" }, @@ -432,7 +432,7 @@ INVESTIGATORS["Stella Clark"] = { signatures = { "60502", "60502", "60502", "60503" }, starterDeck = "2643934" } ---Innsmouth-- +-- The Innsmouth Conspiracy INVESTIGATORS["Sister Mary"] = { cards = { "07001" }, minicards = { "07001-m" }, @@ -463,7 +463,7 @@ INVESTIGATORS["Silas Marsh"] = { signatures = { "07014", "07015", "07016", "98014", "98015" }, starterDeck = "2626685" } ---Edge-- +-- Edge of the Earth INVESTIGATORS["Daniela Reyes"] = { cards = { "08001" }, minicards = { "08001-m" }, @@ -477,9 +477,9 @@ INVESTIGATORS["Norman Withers"] = { starterDeck = "2634603" } INVESTIGATORS["Monterey Jack"] = { - cards = { "08007" }, + cards = { "08007", "08007-p", "08007-pf", "08007-pb" }, minicards = { "08007-m" }, - signatures = { "08008", "08009" }, + signatures = { "08008", "08009", "90063", "90064" }, starterDeck = "2634652" } INVESTIGATORS["Lily Chen"] = { @@ -494,7 +494,7 @@ INVESTIGATORS["Bob Jenkins"] = { signatures = { "08017", "08018" }, starterDeck = "2634643" } ---Scarlet-- +-- The Scarlet Keys INVESTIGATORS["Carson Sinclair"] = { cards = { "09001" }, minicards = { "09001-m" }, @@ -531,7 +531,7 @@ INVESTIGATORS["Charlie Kane"] = { signatures = { "09019", "09020" }, starterDeck = "2634706" } ---Hemlock Vale-- +-- The Feast of Hemlock Vale INVESTIGATORS["Wilson Richards"] = { cards = { "10001" }, minicards = { "10001-m" }, @@ -556,14 +556,14 @@ INVESTIGATORS["Kōhaku Narukami"] = { signatures = { "10013", "10014" }, starterDeck = "2636199" --gloria deck as placeholder } ---PnP-- +-- PnP content INVESTIGATORS["Subject 5U-21"] = { cards = { "89001" }, minicards = { "89001-m" }, signatures = { "89002", "89003", "89003", "89003", "89004", "89004", "89004", "89005" }, starterDeck = "2624990" -- Lola's deck id until Suzi is on ArkhamDB } ---Promo-- +-- Promo content INVESTIGATORS["Gloria Goldberg"] = { cards = { "98019" }, minicards = { "98019-m" }, From ae25c938371f20cf60c291d31197182177d8d5ad Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Mon, 1 Jan 2024 19:36:42 +0100 Subject: [PATCH 5/9] added decklib --- src/core/MythosArea.ttslua | 4 +-- src/playermat/Playmat.ttslua | 49 ++++-------------------------------- src/util/DeckLib.ttslua | 47 ++++++++++++++++++++++++++++++++++ 3 files changed, 54 insertions(+), 46 deletions(-) create mode 100644 src/util/DeckLib.ttslua diff --git a/src/core/MythosArea.ttslua b/src/core/MythosArea.ttslua index 29db5e1d..e3520564 100644 --- a/src/core/MythosArea.ttslua +++ b/src/core/MythosArea.ttslua @@ -1,3 +1,4 @@ +local deckLib = require("util/DeckLib") local guidReferenceApi = require("core/GUIDReferenceApi") local playAreaApi = require("core/PlayAreaApi") local searchLib = require("util/SearchLib") @@ -171,8 +172,7 @@ function actualEncounterCardDraw(card, params) faceUpRotation = 180 end end - card.setPositionSmooth(params.pos, false, false) - card.setRotationSmooth({ 0, params.rotY, faceUpRotation }, false, false) + deckLib.placeOrMergeIntoDeck(card, params.pos, { 0, params.rotY, faceUpRotation }) end function reshuffleEncounterDeck(params) diff --git a/src/playermat/Playmat.ttslua b/src/playermat/Playmat.ttslua index 0d41779f..21939438 100644 --- a/src/playermat/Playmat.ttslua +++ b/src/playermat/Playmat.ttslua @@ -1,8 +1,9 @@ -local searchLib = require("util/SearchLib") local chaosBagApi = require("chaosbag/ChaosBagApi") +local deckLib = require("util/DeckLib") local guidReferenceApi = require("core/GUIDReferenceApi") local mythosAreaApi = require("core/MythosAreaApi") local navigationOverlayApi = require("core/NavigationOverlayApi") +local searchLib = require("util/SearchLib") local tokenChecker = require("core/token/TokenChecker") local tokenManager = require("core/token/TokenManager") @@ -210,9 +211,9 @@ function discardListOfObjects(objList) for _, obj in ipairs(objList) do if obj.type == "Card" or obj.type == "Deck" then if obj.hasTag("PlayerCard") then - placeOrMergeIntoDeck(obj, returnGlobalDiscardPosition(), self.getRotation()) + deckLib.placeOrMergeIntoDeck(obj, returnGlobalDiscardPosition(), self.getRotation()) else - placeOrMergeIntoDeck(obj, ENCOUNTER_DISCARD_POSITION, {x = 0, y = -90, z = 0}) + deckLib.placeOrMergeIntoDeck(obj, ENCOUNTER_DISCARD_POSITION, {x = 0, y = -90, z = 0}) end -- put chaos tokens back into bag (e.g. Unrelenting) elseif tokenChecker.isChaosToken(obj) then @@ -225,46 +226,6 @@ function discardListOfObjects(objList) end end --- places a card/deck at a position or merges into an existing deck --- rotation is optional -function placeOrMergeIntoDeck(obj, pos, rot) - if not pos then return end - - local offset = 0.5 - - -- search the new position for existing card/deck - local searchResult = searchArea(pos, { 1, 1, 1 }, "isCardOrDeck") - - -- get new position - local newPos - if #searchResult == 1 then - local bounds = searchResult[1].getBounds() - newPos = Vector(pos):setAt("y", bounds.center.y + bounds.size.y / 2 + offset) - else - newPos = Vector(pos) + Vector(0, offset, 0) - end - - -- allow moving the objects smoothly out of the hand - obj.use_hands = false - - if rot then - obj.setRotationSmooth(rot, false, true) - end - obj.setPositionSmooth(newPos, false, true) - - -- continue if the card stops smooth moving - Wait.condition( - function() - obj.use_hands = true - -- this avoids a TTS bug that merges unrelated cards that are not resting - if #searchResult == 1 and searchResult[1] ~= obj then - -- call this with avoiding errors (physics is sometimes too fast so the object doesn't exist for the put) - pcall(function() searchResult[1].putObject(obj) end) - end - end, - function() return not obj.isSmoothMoving() end, 3) -end - -- build a discard button to discard from searchPosition (number must be unique) function makeDiscardButton(xValue, number) local position = { xValue, 0.1, -0.94} @@ -530,7 +491,7 @@ function doDiscardOne() -- get a random non-hidden card (from the "choices" table) local num = math.random(1, #choices) - placeOrMergeIntoDeck(hand[choices[num]], returnGlobalDiscardPosition(), self.getRotation()) + deckLib.placeOrMergeIntoDeck(hand[choices[num]], returnGlobalDiscardPosition(), self.getRotation()) broadcastToAll(playerColor .. " randomly discarded card " .. choices[num] .. "/" .. #hand .. ".", "White") end end diff --git a/src/util/DeckLib.ttslua b/src/util/DeckLib.ttslua new file mode 100644 index 00000000..15c24ece --- /dev/null +++ b/src/util/DeckLib.ttslua @@ -0,0 +1,47 @@ +do + local DeckLib = {} + local searchLib = require("util/SearchLib") + + -- places a card/deck at a position or merges into an existing deck + ---@param obj TTSObject Object to move + ---@param pos Table New position for the object + ---@param rot Table New rotation for the object (optional) + DeckLib.placeOrMergeIntoDeck = function(obj, pos, rot) + if obj == nil or pos == nil then return end + + -- search the new position for existing card/deck + local searchResult = searchLib.atPosition(pos, "isCardOrDeck") + + -- get new position + local newPos + local offset = 0.5 + if #searchResult == 1 then + local bounds = searchResult[1].getBounds() + newPos = Vector(pos):setAt("y", bounds.center.y + bounds.size.y / 2 + offset) + else + newPos = Vector(pos) + Vector(0, offset, 0) + end + + -- allow moving the objects smoothly out of the hand + obj.use_hands = false + + if rot then + obj.setRotationSmooth(rot, false, true) + end + obj.setPositionSmooth(newPos, false, true) + + -- continue if the card stops smooth moving + Wait.condition( + function() + obj.use_hands = true + -- this avoids a TTS bug that merges unrelated cards that are not resting + if #searchResult == 1 and searchResult[1] ~= obj then + -- call this with avoiding errors (physics is sometimes too fast so the object doesn't exist for the put) + pcall(function() searchResult[1].putObject(obj) end) + end + end, + function() return not obj.isSmoothMoving() end, 3) + end + + return DeckLib +end From e44aa3fdd3e4858af978388822e01484f2b8f062 Mon Sep 17 00:00:00 2001 From: dscarpac Date: Wed, 3 Jan 2024 09:49:42 -0600 Subject: [PATCH 6/9] searchable area for doom counters matches playmat size --- src/core/DoomInPlayCounter.ttslua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/DoomInPlayCounter.ttslua b/src/core/DoomInPlayCounter.ttslua index 16ec90fe..0fcff336 100644 --- a/src/core/DoomInPlayCounter.ttslua +++ b/src/core/DoomInPlayCounter.ttslua @@ -6,7 +6,7 @@ local doomURL = "https://i.imgur.com/EoL7yaZ.png" local IGNORE_TAG = "DoomCounter_ignore" local TOTAL_PLAY_AREA = { upperLeft = { - x = -10, + x = -9, z = -35 }, lowerRight = { From c79e65ad4c747861f6c74a3ca68cbc59bedab974 Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Fri, 5 Jan 2024 12:39:48 +0100 Subject: [PATCH 7/9] added relics of the past scenario --- .../ChallengeScenarios.9f6801.json | 11 +-- .../ChallengeScenarios.9f6801.luascriptstate | 2 +- .../RelicsofthePast.0d6da1.json | 86 +++++++++++++++++++ 3 files changed, 93 insertions(+), 6 deletions(-) create mode 100644 objects/OfficialStandaloneChallengeScenarios.0ef5c8/ChallengeScenarios.9f6801/RelicsofthePast.0d6da1.json diff --git a/objects/OfficialStandaloneChallengeScenarios.0ef5c8/ChallengeScenarios.9f6801.json b/objects/OfficialStandaloneChallengeScenarios.0ef5c8/ChallengeScenarios.9f6801.json index 920cb3c3..0303be37 100644 --- a/objects/OfficialStandaloneChallengeScenarios.0ef5c8/ChallengeScenarios.9f6801.json +++ b/objects/OfficialStandaloneChallengeScenarios.0ef5c8/ChallengeScenarios.9f6801.json @@ -14,12 +14,13 @@ "r": 1 }, "ContainedObjects_order": [ - "AllorNothing.72ab92", - "BadBlood.451eaa", - "BytheBook.cc7eb3", - "LaidtoRest.e2dd57", + "RelicsofthePast.0d6da1", + "RedTideRising.5302f2", "ReadorDie.9e73fa", - "RedTideRising.5302f2" + "LaidtoRest.e2dd57", + "BytheBook.cc7eb3", + "BadBlood.451eaa", + "AllorNothing.72ab92" ], "ContainedObjects_path": "ChallengeScenarios.9f6801", "CustomMesh": { diff --git a/objects/OfficialStandaloneChallengeScenarios.0ef5c8/ChallengeScenarios.9f6801.luascriptstate b/objects/OfficialStandaloneChallengeScenarios.0ef5c8/ChallengeScenarios.9f6801.luascriptstate index eacd2ea5..f2d8ef3d 100644 --- a/objects/OfficialStandaloneChallengeScenarios.0ef5c8/ChallengeScenarios.9f6801.luascriptstate +++ b/objects/OfficialStandaloneChallengeScenarios.0ef5c8/ChallengeScenarios.9f6801.luascriptstate @@ -1 +1 @@ -{"ml":{"451eaa":{"lock":false,"pos":{"x":12.252,"y":1.4815,"z":11.986},"rot":{"x":0,"y":269.9999,"z":0}},"5302f2":{"lock":false,"pos":{"x":12.2505,"y":1.4815,"z":-20.0137},"rot":{"x":0,"y":270.0014,"z":0}},"72ab92":{"lock":false,"pos":{"x":12.25,"y":1.4815,"z":19.986},"rot":{"x":0,"y":269.9999,"z":0}},"9e73fa":{"lock":false,"pos":{"x":12.2501,"y":1.4815,"z":-12.0137},"rot":{"x":0,"y":269.9998,"z":0}},"cc7eb3":{"lock":false,"pos":{"x":12.25,"y":1.4815,"z":3.986},"rot":{"x":0,"y":269.9999,"z":0}},"e2dd57":{"lock":false,"pos":{"x":12.25,"y":1.4815,"z":-4.014},"rot":{"x":0,"y":270,"z":0}}}} +{"ml":{"0d6da1":{"lock":false,"pos":{"x":12.25,"y":1.4815,"z":-28.014},"rot":{"x":0,"y":270.0014,"z":0}},"451eaa":{"lock":false,"pos":{"x":12.252,"y":1.4815,"z":11.986},"rot":{"x":0,"y":269.9999,"z":0}},"5302f2":{"lock":false,"pos":{"x":12.2505,"y":1.4815,"z":-20.0137},"rot":{"x":0,"y":270.0014,"z":0}},"72ab92":{"lock":false,"pos":{"x":12.25,"y":1.4815,"z":19.986},"rot":{"x":0,"y":269.9999,"z":0}},"9e73fa":{"lock":false,"pos":{"x":12.2501,"y":1.4815,"z":-12.0137},"rot":{"x":0,"y":269.9998,"z":0}},"cc7eb3":{"lock":false,"pos":{"x":12.25,"y":1.4815,"z":3.986},"rot":{"x":0,"y":269.9999,"z":0}},"e2dd57":{"lock":false,"pos":{"x":12.25,"y":1.4815,"z":-4.014},"rot":{"x":0,"y":270,"z":0}}}} diff --git a/objects/OfficialStandaloneChallengeScenarios.0ef5c8/ChallengeScenarios.9f6801/RelicsofthePast.0d6da1.json b/objects/OfficialStandaloneChallengeScenarios.0ef5c8/ChallengeScenarios.9f6801/RelicsofthePast.0d6da1.json new file mode 100644 index 00000000..91794ecb --- /dev/null +++ b/objects/OfficialStandaloneChallengeScenarios.0ef5c8/ChallengeScenarios.9f6801/RelicsofthePast.0d6da1.json @@ -0,0 +1,86 @@ +{ + "AltLookAngle": { + "x": 0, + "y": 0, + "z": 0 + }, + "AttachedDecals": [ + { + "CustomDecal": { + "ImageURL": "http://cloud-3.steamusercontent.com/ugc/959719855119695911/931B9829687A20F4DEADB36DA57B7E6D76792231/", + "Name": "dunwich_back", + "Size": 7.4 + }, + "Transform": { + "posX": -0.0021877822, + "posY": -0.08963572, + "posZ": -0.00288731651, + "rotX": 270, + "rotY": 359.869568, + "rotZ": 0, + "scaleX": 2.00000215, + "scaleY": 2.00000238, + "scaleZ": 2.00000262 + } + } + ], + "Autoraise": true, + "ColorDiffuse": { + "a": 0.27451, + "b": 1, + "g": 1, + "r": 1 + }, + "CustomMesh": { + "CastShadows": true, + "ColliderURL": "", + "Convex": true, + "CustomShader": { + "FresnelStrength": 0, + "SpecularColor": { + "b": 1, + "g": 1, + "r": 1 + }, + "SpecularIntensity": 0, + "SpecularSharpness": 2 + }, + "DiffuseURL": "http://cloud-3.steamusercontent.com/ugc/2299716459828640802/A224024254ABCFB818F12B50C1E5E0B32060F972/", + "MaterialIndex": 3, + "MeshURL": "https://raw.githubusercontent.com/RobMayer/TTSLibrary/master/advboxes/tuckbox_h_MSH.obj", + "NormalURL": "", + "TypeIndex": 0 + }, + "Description": "Challenge Scenario", + "DragSelectable": true, + "GMNotes": "scenarios/challenge_relics_of_the_past.json", + "GUID": "0d6da1", + "Grid": true, + "GridProjection": false, + "Hands": false, + "HideWhenFaceDown": false, + "IgnoreFoW": false, + "LayoutGroupSortIndex": 0, + "Locked": false, + "LuaScript": "require(\"core/DownloadBox\")", + "LuaScriptState": "", + "MeasureMovement": false, + "Name": "Custom_Model", + "Nickname": "Relics of the Past", + "Snap": true, + "Sticky": true, + "Tooltip": true, + "Transform": { + "posX": 12.25, + "posY": 1.481, + "posZ": -28.014, + "rotX": 0, + "rotY": 270, + "rotZ": 0, + "scaleX": 2.21, + "scaleY": 0.46, + "scaleZ": 2.42 + }, + "Value": 0, + "XmlUI": "" +} From 8115f0cb3c56fd62449771a0be09eb63701f6760 Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Sat, 6 Jan 2024 13:42:58 +0100 Subject: [PATCH 8/9] omit the threshold if doom is reset --- src/core/DoomCounter.ttslua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/core/DoomCounter.ttslua b/src/core/DoomCounter.ttslua index a8c05a21..eb6ce5cc 100644 --- a/src/core/DoomCounter.ttslua +++ b/src/core/DoomCounter.ttslua @@ -58,7 +58,11 @@ end function updateVal(number) val = number or 0 self.editButton({ index = 0, label = tostring(val) }) - broadcastDoom(val) + if number then + broadcastDoom(val) + else + broadcastToAll("0 doom on the agenda", "White") + end end -- called by updateVal and addVal to broadcast total doom in play, including doom threshold @@ -77,7 +81,8 @@ end -- called by "Reset" button to remove doom function startReset() if options.Agenda then - updateVal(0) + -- omitting the number will broadcast a special message just for this case + updateVal() end local doomInPlayCounter = guidReferenceApi.getObjectByOwnerAndType("Mythos", "DoomInPlayCounter") if doomInPlayCounter then From d931d2182203eb2914bcdc5f7e2d880f09d7ad18 Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Mon, 8 Jan 2024 15:29:38 +0100 Subject: [PATCH 9/9] fixed bracket placement --- src/core/GameKeyHandler.ttslua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/GameKeyHandler.ttslua b/src/core/GameKeyHandler.ttslua index 83e719b0..1b2ec83b 100644 --- a/src/core/GameKeyHandler.ttslua +++ b/src/core/GameKeyHandler.ttslua @@ -150,7 +150,7 @@ function removeOneUse(playerColor, hoveredObject) local searchForType = useInfo.type if searchForType then searchForType = searchForType:lower() end - for _, obj in ipairs(searchLib.onObject(hoveredObject), "isTileOrToken") do + for _, obj in ipairs(searchLib.onObject(hoveredObject, "isTileOrToken")) do if not obj.locked and obj.memo ~= "resourceCounter" then -- check for matching object, otherwise use the first hit if obj.memo == searchForType then