diff --git a/config.json b/config.json index b310a2c9..1502b6a4 100644 --- a/config.json +++ b/config.json @@ -192,7 +192,8 @@ "Decoration-Ammo.b43845", "Decoration-Ammo.d35ee9", "VictoryDisplay.6ccd6d", - "CampaignOverview.e03c01", + "OfficialReleasesOverview.8e22bb", + "Fan-MadeExpansionOverview.de7cae", "OptionPanelSource.830bd0", "SoundCube.3c988f", "GameKeyHandler.fce69c", diff --git a/objects/AllPlayerCards.15bb07.json b/objects/AllPlayerCards.15bb07.json index d280fc5a..1325f099 100644 --- a/objects/AllPlayerCards.15bb07.json +++ b/objects/AllPlayerCards.15bb07.json @@ -20,6 +20,11 @@ "RealityAcid.0a1b3a", "RealityAcidReference.858b0a", "Ravenous.558b0a", + "RexMurphyParallel.0a5492", + "RexMurphyParallelBack.0a5493", + "RexMurphyParallelFront.0a5494", + "SearchfortheTruth.4156dd", + "RexsCurse.033a36", "CharlieKane.4deeff", "FinnEdwards.dd40c0", "MontereyJack.46b145", @@ -1748,4 +1753,4 @@ }, "Value": 0, "XmlUI": "" -} +} \ No newline at end of file diff --git a/objects/AllPlayerCards.15bb07/RexMurphyParallel.0a5492.gmnotes b/objects/AllPlayerCards.15bb07/RexMurphyParallel.0a5492.gmnotes new file mode 100644 index 00000000..e66e4166 --- /dev/null +++ b/objects/AllPlayerCards.15bb07/RexMurphyParallel.0a5492.gmnotes @@ -0,0 +1,11 @@ +{ + "id": "02002-p", + "type": "Investigator", + "class": "Seeker", + "traits": "Reporter.", + "willpowerIcons": 3, + "intellectIcons": 4, + "combatIcons": 2, + "agilityIcons": 3, + "cycle": "Hunting for Answers" +} diff --git a/objects/AllPlayerCards.15bb07/RexMurphyParallel.0a5492.json b/objects/AllPlayerCards.15bb07/RexMurphyParallel.0a5492.json new file mode 100644 index 00000000..2cb14b3f --- /dev/null +++ b/objects/AllPlayerCards.15bb07/RexMurphyParallel.0a5492.json @@ -0,0 +1,62 @@ +{ + "AltLookAngle": { + "x": 0, + "y": 0, + "z": 0 + }, + "Autoraise": true, + "CardID": 14000, + "ColorDiffuse": { + "b": 0.71324, + "g": 0.71324, + "r": 0.71324 + }, + "CustomDeck": { + "140": { + "BackIsHidden": true, + "BackURL": "http://cloud-3.steamusercontent.com/ugc/2414565357243141810/67954474A3DC9311DA0628A864960FD14DD1C7D0/", + "FaceURL": "http://cloud-3.steamusercontent.com/ugc/2414565357243141984/62A87E727E9F6120771487CC69B71224623A018F/", + "NumHeight": 1, + "NumWidth": 1, + "Type": 0, + "UniqueBack": false + } + }, + "Description": "The Reporter", + "DragSelectable": true, + "GMNotes_path": "AllPlayerCards.15bb07/RexMurphyParallel.0a5492.gmnotes", + "GUID": "0a5492", + "Grid": true, + "GridProjection": false, + "Hands": true, + "HideWhenFaceDown": false, + "IgnoreFoW": false, + "LayoutGroupSortIndex": 0, + "Locked": false, + "LuaScript": "", + "LuaScriptState": "", + "MeasureMovement": false, + "Name": "CardCustom", + "Nickname": "Rex Murphy (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/RexMurphyParallelBack.0a5493.gmnotes b/objects/AllPlayerCards.15bb07/RexMurphyParallelBack.0a5493.gmnotes new file mode 100644 index 00000000..9ec15420 --- /dev/null +++ b/objects/AllPlayerCards.15bb07/RexMurphyParallelBack.0a5493.gmnotes @@ -0,0 +1,11 @@ +{ + "id": "02002-pb", + "type": "Investigator", + "class": "Seeker", + "traits": "Reporter.", + "willpowerIcons": 3, + "intellectIcons": 4, + "combatIcons": 2, + "agilityIcons": 3, + "cycle": "Hunting for Answers" +} diff --git a/objects/AllPlayerCards.15bb07/RexMurphyParallelBack.0a5493.json b/objects/AllPlayerCards.15bb07/RexMurphyParallelBack.0a5493.json new file mode 100644 index 00000000..e058ac2d --- /dev/null +++ b/objects/AllPlayerCards.15bb07/RexMurphyParallelBack.0a5493.json @@ -0,0 +1,62 @@ +{ + "AltLookAngle": { + "x": 0, + "y": 0, + "z": 0 + }, + "Autoraise": true, + "CardID": 14100, + "ColorDiffuse": { + "b": 0.71324, + "g": 0.71324, + "r": 0.71324 + }, + "CustomDeck": { + "141": { + "BackIsHidden": true, + "BackURL": "http://cloud-3.steamusercontent.com/ugc/2414565357243141810/67954474A3DC9311DA0628A864960FD14DD1C7D0/", + "FaceURL": "http://cloud-3.steamusercontent.com/ugc/2414565357243142219/EB53C43AB498B112B5EA2C488F0EB1543CD43DE5/", + "NumHeight": 1, + "NumWidth": 1, + "Type": 0, + "UniqueBack": false + } + }, + "Description": "The Reporter", + "DragSelectable": true, + "GMNotes_path": "AllPlayerCards.15bb07/RexMurphyParallelBack.0a5493.gmnotes", + "GUID": "0a5493", + "Grid": true, + "GridProjection": false, + "Hands": true, + "HideWhenFaceDown": false, + "IgnoreFoW": false, + "LayoutGroupSortIndex": 0, + "Locked": false, + "LuaScript": "", + "LuaScriptState": "", + "MeasureMovement": false, + "Name": "CardCustom", + "Nickname": "Rex Murphy (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/RexMurphyParallelFront.0a5494.gmnotes b/objects/AllPlayerCards.15bb07/RexMurphyParallelFront.0a5494.gmnotes new file mode 100644 index 00000000..bad489b9 --- /dev/null +++ b/objects/AllPlayerCards.15bb07/RexMurphyParallelFront.0a5494.gmnotes @@ -0,0 +1,11 @@ +{ + "id": "02002-pf", + "type": "Investigator", + "class": "Seeker", + "traits": "Reporter.", + "willpowerIcons": 3, + "intellectIcons": 4, + "combatIcons": 2, + "agilityIcons": 3, + "cycle": "Hunting for Answers" +} diff --git a/objects/AllPlayerCards.15bb07/RexMurphyParallelFront.0a5494.json b/objects/AllPlayerCards.15bb07/RexMurphyParallelFront.0a5494.json new file mode 100644 index 00000000..3b953e73 --- /dev/null +++ b/objects/AllPlayerCards.15bb07/RexMurphyParallelFront.0a5494.json @@ -0,0 +1,62 @@ +{ + "AltLookAngle": { + "x": 0, + "y": 0, + "z": 0 + }, + "Autoraise": true, + "CardID": 14200, + "ColorDiffuse": { + "b": 0.71324, + "g": 0.71324, + "r": 0.71324 + }, + "CustomDeck": { + "142": { + "BackIsHidden": true, + "BackURL": "http://cloud-3.steamusercontent.com/ugc/2414565357243142126/51E7BDBC4F3E68487E896E867200B6C9310ADF3D/", + "FaceURL": "http://cloud-3.steamusercontent.com/ugc/2414565357243141984/62A87E727E9F6120771487CC69B71224623A018F/", + "NumHeight": 1, + "NumWidth": 1, + "Type": 0, + "UniqueBack": false + } + }, + "Description": "The Reporter", + "DragSelectable": true, + "GMNotes_path": "AllPlayerCards.15bb07/RexMurphyParallelFront.0a5494.gmnotes", + "GUID": "0a5494", + "Grid": true, + "GridProjection": false, + "Hands": true, + "HideWhenFaceDown": false, + "IgnoreFoW": false, + "LayoutGroupSortIndex": 0, + "Locked": false, + "LuaScript": "", + "LuaScriptState": "", + "MeasureMovement": false, + "Name": "CardCustom", + "Nickname": "Rex Murphy (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/RexMurphyTaboo.0a5491.json b/objects/AllPlayerCards.15bb07/RexMurphyTaboo.0a5491.json index 2f83e859..4168dc5c 100644 --- a/objects/AllPlayerCards.15bb07/RexMurphyTaboo.0a5491.json +++ b/objects/AllPlayerCards.15bb07/RexMurphyTaboo.0a5491.json @@ -5,21 +5,21 @@ "z": 0 }, "Autoraise": true, - "CardID": 55100, + "CardID": 14300, "ColorDiffuse": { "b": 0.71324, "g": 0.71324, "r": 0.71324 }, "CustomDeck": { - "551": { + "143": { "BackIsHidden": true, - "BackURL": "http://cloud-3.steamusercontent.com/ugc/2021607899142907490/4AAE686A793E66311FF78890309D20670A329D16/", - "FaceURL": "http://cloud-3.steamusercontent.com/ugc/2021607899142907034/013ED775CA50C6FC71731E4FBAEBF1ECA8C68F1E/", - "NumHeight": 2, - "NumWidth": 2, + "BackURL": "http://cloud-3.steamusercontent.com/ugc/2414565357243142126/51E7BDBC4F3E68487E896E867200B6C9310ADF3D/", + "FaceURL": "http://cloud-3.steamusercontent.com/ugc/2414565357243142219/EB53C43AB498B112B5EA2C488F0EB1543CD43DE5/", + "NumHeight": 1, + "NumWidth": 1, "Type": 0, - "UniqueBack": true + "UniqueBack": false } }, "Description": "The Reporter", @@ -36,7 +36,7 @@ "LuaScript": "", "LuaScriptState": "", "MeasureMovement": false, - "Name": "Card", + "Name": "CardCustom", "Nickname": "Rex Murphy (Taboo)", "SidewaysCard": true, "Snap": true, diff --git a/objects/AllPlayerCards.15bb07/RexsCurse.033a36.gmnotes b/objects/AllPlayerCards.15bb07/RexsCurse.033a36.gmnotes new file mode 100644 index 00000000..468349d8 --- /dev/null +++ b/objects/AllPlayerCards.15bb07/RexsCurse.033a36.gmnotes @@ -0,0 +1,8 @@ +{ + "id": "90080", + "type": "Treachery", + "class": "Neutral", + "traits": "Curse.", + "weakness": true, + "cycle": "Hunting for Answers" +} diff --git a/objects/AllPlayerCards.15bb07/RexsCurse.033a36.json b/objects/AllPlayerCards.15bb07/RexsCurse.033a36.json new file mode 100644 index 00000000..426018f2 --- /dev/null +++ b/objects/AllPlayerCards.15bb07/RexsCurse.033a36.json @@ -0,0 +1,61 @@ +{ + "AltLookAngle": { + "x": 0, + "y": 0, + "z": 0 + }, + "Autoraise": true, + "CardID": 14500, + "ColorDiffuse": { + "b": 0.71324, + "g": 0.71324, + "r": 0.71324 + }, + "CustomDeck": { + "145": { + "BackIsHidden": true, + "BackURL": "http://cloud-3.steamusercontent.com/ugc/2342503777940352139/A2D42E7E5C43D045D72CE5CFC907E4F886C8C690/", + "FaceURL": "http://cloud-3.steamusercontent.com/ugc/2414565357243142499/838D53FA16318A3141B6F5875B11F6B87FA7C37F/", + "NumHeight": 1, + "NumWidth": 1, + "Type": 0, + "UniqueBack": false + } + }, + "Description": "Advanced", + "DragSelectable": true, + "GMNotes_path": "AllPlayerCards.15bb07/RexsCurse.033a36.gmnotes", + "GUID": "033a36", + "Grid": true, + "GridProjection": false, + "Hands": true, + "HideWhenFaceDown": true, + "IgnoreFoW": false, + "LayoutGroupSortIndex": 0, + "Locked": false, + "LuaScript": "", + "LuaScriptState": "", + "MeasureMovement": false, + "Name": "Card", + "Nickname": "Rex's Curse", + "SidewaysCard": false, + "Snap": true, + "Sticky": true, + "Tags": [ + "PlayerCard" + ], + "Tooltip": true, + "Transform": { + "posX": 9.132, + "posY": 5.515, + "posZ": -16.723, + "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/SearchfortheTruth.4156dd.gmnotes b/objects/AllPlayerCards.15bb07/SearchfortheTruth.4156dd.gmnotes new file mode 100644 index 00000000..d1fcb84d --- /dev/null +++ b/objects/AllPlayerCards.15bb07/SearchfortheTruth.4156dd.gmnotes @@ -0,0 +1,10 @@ +{ + "id": "90079", + "type": "Event", + "class": "Neutral", + "cost": 1, + "traits": "Insight.", + "intellectIcons": 2, + "wildIcons": 1, + "cycle": "Hunting for Answers" +} diff --git a/objects/AllPlayerCards.15bb07/SearchfortheTruth.4156dd.json b/objects/AllPlayerCards.15bb07/SearchfortheTruth.4156dd.json new file mode 100644 index 00000000..92e19d9e --- /dev/null +++ b/objects/AllPlayerCards.15bb07/SearchfortheTruth.4156dd.json @@ -0,0 +1,61 @@ +{ + "AltLookAngle": { + "x": 0, + "y": 0, + "z": 0 + }, + "Autoraise": true, + "CardID": 14400, + "ColorDiffuse": { + "b": 0.71324, + "g": 0.71324, + "r": 0.71324 + }, + "CustomDeck": { + "144": { + "BackIsHidden": true, + "BackURL": "http://cloud-3.steamusercontent.com/ugc/2342503777940352139/A2D42E7E5C43D045D72CE5CFC907E4F886C8C690/", + "FaceURL": "http://cloud-3.steamusercontent.com/ugc/2414565357243142330/B4BB77B904CF3AFAF3181392C4849174F3D87D46/", + "NumHeight": 1, + "NumWidth": 1, + "Type": 0, + "UniqueBack": false + } + }, + "Description": "Advanced", + "DragSelectable": true, + "GMNotes_path": "AllPlayerCards.15bb07/SearchfortheTruth.4156dd.gmnotes", + "GUID": "4156dd", + "Grid": true, + "GridProjection": false, + "Hands": true, + "HideWhenFaceDown": true, + "IgnoreFoW": false, + "LayoutGroupSortIndex": 0, + "Locked": false, + "LuaScript": "", + "LuaScriptState": "", + "MeasureMovement": false, + "Name": "CardCustom", + "Nickname": "Search for the Truth", + "SidewaysCard": false, + "Snap": true, + "Sticky": true, + "Tags": [ + "PlayerCard" + ], + "Tooltip": true, + "Transform": { + "posX": 9.099, + "posY": 3.726, + "posZ": -16.715, + "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/Fan-MadeExpansionOverview.de7cae.json b/objects/Fan-MadeExpansionOverview.de7cae.json new file mode 100644 index 00000000..2af7d3e5 --- /dev/null +++ b/objects/Fan-MadeExpansionOverview.de7cae.json @@ -0,0 +1,57 @@ +{ + "AltLookAngle": { + "x": 0, + "y": 0, + "z": 0 + }, + "Autoraise": true, + "ColorDiffuse": { + "b": 1, + "g": 1, + "r": 1 + }, + "CustomImage": { + "CustomTile": { + "Stackable": false, + "Stretch": true, + "Thickness": 0.1, + "Type": 0 + }, + "ImageScalar": 1, + "ImageSecondaryURL": "http://cloud-3.steamusercontent.com/ugc/2460726979851342612/65DEC18BEFEFB1117CFEAAE9AB15B442AE8B557B/", + "ImageURL": "http://cloud-3.steamusercontent.com/ugc/2460726979851342006/859CF14CE18A4F8C2AFDADA3E69E1B6864154696/", + "WidthScale": 0 + }, + "Description": "", + "DragSelectable": true, + "GMNotes": "", + "GUID": "de7cae", + "Grid": true, + "GridProjection": false, + "Hands": false, + "HideWhenFaceDown": false, + "IgnoreFoW": false, + "LayoutGroupSortIndex": 0, + "Locked": false, + "LuaScript": "", + "LuaScriptState": "", + "MeasureMovement": false, + "Name": "Custom_Tile", + "Nickname": "Fan-Made Expansion Overview", + "Snap": true, + "Sticky": true, + "Tooltip": true, + "Transform": { + "posX": -1.6, + "posY": 1.481, + "posZ": -75, + "rotX": 0, + "rotY": 270, + "rotZ": 0, + "scaleX": 13, + "scaleY": 1, + "scaleZ": 13 + }, + "Value": 0, + "XmlUI": "" +} diff --git a/objects/CampaignOverview.e03c01.json b/objects/OfficialReleasesOverview.8e22bb.json similarity index 76% rename from objects/CampaignOverview.e03c01.json rename to objects/OfficialReleasesOverview.8e22bb.json index 17f09396..90b7d506 100644 --- a/objects/CampaignOverview.e03c01.json +++ b/objects/OfficialReleasesOverview.8e22bb.json @@ -18,33 +18,33 @@ "Type": 0 }, "ImageScalar": 1, - "ImageSecondaryURL": "http://cloud-3.steamusercontent.com/ugc/2037357232933163412/1D2EE3BD0758463D8F6EB0DA30C59A21694BB1A4/", - "ImageURL": "http://cloud-3.steamusercontent.com/ugc/2037357232933163412/1D2EE3BD0758463D8F6EB0DA30C59A21694BB1A4/", + "ImageSecondaryURL": "http://cloud-3.steamusercontent.com/ugc/2460726979851338290/FD3A124A45AFAACAB85E34060B09B52FE798E991/", + "ImageURL": "http://cloud-3.steamusercontent.com/ugc/2460726979851337461/C6A08EA4A71B37F9C27E2545037F557D65BBF521/", "WidthScale": 0 }, "Description": "", "DragSelectable": true, "GMNotes": "", - "GUID": "e03c01", + "GUID": "8e22bb", "Grid": true, "GridProjection": false, "Hands": false, "HideWhenFaceDown": false, "IgnoreFoW": false, "LayoutGroupSortIndex": 0, - "Locked": true, + "Locked": false, "LuaScript": "", "LuaScriptState": "", "MeasureMovement": false, "Name": "Custom_Tile", - "Nickname": "Campaign Overview", + "Nickname": "Official Releases Overview", "Snap": true, "Sticky": true, "Tooltip": true, "Transform": { "posX": -1.6, "posY": 1.481, - "posZ": -58.5, + "posZ": -55, "rotX": 0, "rotY": 270, "rotZ": 0, diff --git a/src/accessories/CleanUpHelper.ttslua b/src/accessories/CleanUpHelper.ttslua index bbfd1c04..9ab49401 100644 --- a/src/accessories/CleanUpHelper.ttslua +++ b/src/accessories/CleanUpHelper.ttslua @@ -1,7 +1,7 @@ ---[[ Cleans up the table for the next scenario in a campaign: -- sets counters to default values (resources and doom) or trauma values (health and sanity, if not disabled) from campaign log -- puts everything on playmats and hands into respective trashcans -- use the IGNORE_TAG to exclude objects from tidying (default: "CleanUpHelper_Ignore")]] +-- Cleans up the table for the next scenario in a campaign: +-- sets counters to default values (resources and doom) or trauma values (health and sanity, if not disabled) from campaign log +-- puts everything on playmats and hands into respective trashcans +-- use the IGNORE_TAG to exclude objects from tidying (default: "CleanUpHelper_Ignore") local blessCurseManagerApi = require("chaosbag/BlessCurseManagerApi") local chaosBagApi = require("chaosbag/ChaosBagApi") @@ -30,7 +30,6 @@ options["removeDrawnLines"] = false local buttonParameters = {} buttonParameters.function_owner = self - --------------------------------------------------------- -- option loading and GUI setup --------------------------------------------------------- @@ -114,7 +113,7 @@ function cleanUp(_, color) ignoreCustomDataHelper() getTrauma() - -- delay to account for potential state change + -- delay to account for potential state change of campaign log Wait.time(updateCounters, 0.2) resetDoomCounter() @@ -255,7 +254,7 @@ function tidyPlayareaCoroutine() for _, obj in ipairs(playAreaZone.getObjects()) do -- ignore these elements if obj.hasTag(IGNORE_TAG) == false - and obj.locked == false + and obj.locked == false and obj.interactable == true then coroutine.yield(0) trash.putObject(obj) @@ -279,7 +278,7 @@ function tidyPlayerMatCoroutine() -- get respective trash local trash = guidReferenceApi.getObjectByOwnerAndType(COLORS[i], "Trash") if trash == nil then - printToAll("Trashcan for " .. COLORS[i] .. " playmat could not be found!", "Red") + printToAll("Trashcan for " .. COLORS[i] .. " playmat could not be found! Skipping this playermat.", "Yellow") goto continue end @@ -296,28 +295,41 @@ function tidyPlayerMatCoroutine() if obj.hasTag(IGNORE_TAG) == false and obj.getDescription() ~= "Action Token" and obj.hasTag("chaosBag") == false - and obj.locked == false + and obj.locked == false and obj.interactable == true then coroutine.yield(0) trash.putObject(obj) - -- flip action tokens back to ready - elseif obj.getDescription() == "Action Token" and obj.is_face_down then - obj.flip() - end - end + -- action token handling + elseif obj.getDescription() == "Action Token" then + -- move the small action token to the proper position + if obj.getScale().x < 0.4 then + local pos = playmatApi.transformLocalPosition(Vector(-0.865, 0.1, -0.28), COLORS[i]) + obj.setPosition(pos) + end - -- reset "activeInvestigatorId" - if i < 5 then - local playermat = guidReferenceApi.getObjectByOwnerAndType(COLORS[i], "Playermat") - if playermat then - playermat.setVar("activeInvestigatorId", "00000") + -- flip action tokens back to ready + if obj.is_face_down then + obj.flip() + end + + -- reset action token state + local stateId = obj.getStateId() + if stateId ~= -1 and stateId ~= 6 then + obj.setState(6) + end end end end ::continue:: end + -- reset "activeInvestigatorId" + local playerMats = guidReferenceApi.getObjectsByType("Playermat") + for _, mat in pairs(playerMats) do + mat.setVar("activeInvestigatorId", "00000") + end + -- reset spawned data tokenSpawnTrackerApi.resetAll() local datahelper = guidReferenceApi.getObjectByOwnerAndType("Mythos", "DataHelper") diff --git a/src/core/GameKeyHandler.ttslua b/src/core/GameKeyHandler.ttslua index ba03d318..049dd7cb 100644 --- a/src/core/GameKeyHandler.ttslua +++ b/src/core/GameKeyHandler.ttslua @@ -280,24 +280,30 @@ end -- takes a clue from a location, player needs to hover the clue directly or the location function takeClueFromLocation(playerColor, hoveredObject) + -- use different color for messages if player is not seated (because this hotkey is called for a different mat) + local messageColor = playerColor + if not Player[playerColor] or not Player[playerColor].seated then + messageColor = getFirstSeatedPlayer() + end + local cardName, clue if hoveredObject == nil then - broadcastToColor("Hover a clue or card with clues and try again.", playerColor, "Yellow") + broadcastToColor("Hover a clue or card with clues and try again.", messageColor, "Yellow") return elseif hoveredObject.type == "Card" then cardName = hoveredObject.getName() local searchResult = searchLib.onObject(hoveredObject, "isClue") if #searchResult == 0 then - broadcastToColor("This card does not have any clues on it.", playerColor, "Yellow") + broadcastToColor("This card does not have any clues on it.", messageColor, "Yellow") return else clue = searchResult[1] end elseif hoveredObject.memo == "clueDoom" then if hoveredObject.is_face_down then - broadcastToColor("This is a doom token and not a clue.", playerColor, "Yellow") + broadcastToColor("This is a doom token and not a clue.", messageColor, "Yellow") return end @@ -311,14 +317,22 @@ function takeClueFromLocation(playerColor, hoveredObject) clue = hoveredObject.takeObject() cardName = "token pool" else - broadcastToColor("Hover a clue or card with clues and try again.", playerColor, "Yellow") + broadcastToColor("Hover a clue or card with clues and try again.", messageColor, "Yellow") return end local clickableClues = optionPanelApi.getOptions()["useClueClickers"] - local playerName = Player[playerColor].steam_name - local matColor = playmatApi.getMatColor(playerColor) - local pos = nil + + -- handling for calling this for a specific mat via hotkey + local playerName, matColor, pos + if Player[playerColor] and Player[playerColor].seated then + playerName = Player[playerColor].steam_name + matColor = playmatApi.getMatColor(playerColor) + else + playerName = playerColor + matColor = playerColor + end + if clickableClues then pos = {x = 0.49, y = 2.66, z = 0.00} playmatApi.updateCounter(matColor, "ClickableClueCounter", _, 1) @@ -371,3 +385,10 @@ function titleCase(str) local rest = str:sub(2) return first:upper() .. rest:lower() end + +-- returns the color of the first seated player +function getFirstSeatedPlayer() + for _, color in ipairs(getSeatedPlayers()) do + return color + end +end diff --git a/src/playercards/PlayerCardPanelData.ttslua b/src/playercards/PlayerCardPanelData.ttslua index 623ba13a..1d78ddb4 100644 --- a/src/playercards/PlayerCardPanelData.ttslua +++ b/src/playercards/PlayerCardPanelData.ttslua @@ -255,9 +255,9 @@ INVESTIGATORS["Zoey Samaras"] = { starterDeck = "2624950" } INVESTIGATORS["Rex Murphy"] = { - cards = { "02002", "02002-t" }, + cards = { "02002", "02002-t", "02002-p", "02002-pf", "02002-pb" }, minicards = { "02002-m" }, - signatures = { "02008", "02009" }, + signatures = { "02008", "02009", "90079", "90080" }, starterDeck = "2624958" } INVESTIGATORS["Jenny Barnes"] = {