added guid reference handler
This commit is contained in:
parent
de61831956
commit
ce01733ef3
@ -19,6 +19,7 @@
|
|||||||
"MusicPlayer_path": "MusicPlayer.json",
|
"MusicPlayer_path": "MusicPlayer.json",
|
||||||
"Note": "",
|
"Note": "",
|
||||||
"ObjectStates_order": [
|
"ObjectStates_order": [
|
||||||
|
"GUIDReferenceHandler.da23e4",
|
||||||
"HandTrigger.5fe087",
|
"HandTrigger.5fe087",
|
||||||
"HandTrigger.be2f17",
|
"HandTrigger.be2f17",
|
||||||
"HandTrigger.0285cc",
|
"HandTrigger.0285cc",
|
||||||
|
@ -1575,7 +1575,6 @@
|
|||||||
"LuaScriptState": "",
|
"LuaScriptState": "",
|
||||||
"MaterialIndex": -1,
|
"MaterialIndex": -1,
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"Memo": "{\"matColor\":\"Mythos\",\"type\":\"AllCardsBag\"}",
|
|
||||||
"MeshIndex": -1,
|
"MeshIndex": -1,
|
||||||
"Name": "Bag",
|
"Name": "Bag",
|
||||||
"Nickname": "All Player Cards",
|
"Nickname": "All Player Cards",
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
"LuaScript": "require(\"arkhamdb/DeckImporterMain\")",
|
"LuaScript": "require(\"arkhamdb/DeckImporterMain\")",
|
||||||
"LuaScriptState_path": "ArkhamDBDeckImporter.a28140.luascriptstate",
|
"LuaScriptState_path": "ArkhamDBDeckImporter.a28140.luascriptstate",
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"Memo": "{\"matColor\":\"Mythos\",\"type\":\"DeckImporter\"}",
|
|
||||||
"Name": "Custom_Tile",
|
"Name": "Custom_Tile",
|
||||||
"Nickname": "ArkhamDB Deck Importer",
|
"Nickname": "ArkhamDB Deck Importer",
|
||||||
"Snap": false,
|
"Snap": false,
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
"LuaScript": "require(\"chaosbag/BlessCurseManager\")",
|
"LuaScript": "require(\"chaosbag/BlessCurseManager\")",
|
||||||
"LuaScriptState": "false",
|
"LuaScriptState": "false",
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"Memo": "{\"matColor\":\"Mythos\",\"type\":\"BlessCurseManager\"}",
|
|
||||||
"Name": "Custom_Token",
|
"Name": "Custom_Token",
|
||||||
"Nickname": "Bless/Curse Manager",
|
"Nickname": "Bless/Curse Manager",
|
||||||
"Snap": true,
|
"Snap": true,
|
||||||
|
@ -45,7 +45,6 @@
|
|||||||
"LuaScript": "require(\"playermat/ClueCounter\")",
|
"LuaScript": "require(\"playermat/ClueCounter\")",
|
||||||
"LuaScriptState": "",
|
"LuaScriptState": "",
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"Memo": "{\"matColor\":\"Green\",\"type\":\"ClueCounter\"}",
|
|
||||||
"Name": "Custom_Model",
|
"Name": "Custom_Model",
|
||||||
"Nickname": "Clue Counter",
|
"Nickname": "Clue Counter",
|
||||||
"Snap": true,
|
"Snap": true,
|
||||||
|
@ -45,7 +45,6 @@
|
|||||||
"LuaScript": "require(\"playermat/ClueCounter\")",
|
"LuaScript": "require(\"playermat/ClueCounter\")",
|
||||||
"LuaScriptState": "",
|
"LuaScriptState": "",
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"Memo": "{\"matColor\":\"Orange\",\"type\":\"ClueCounter\"}",
|
|
||||||
"Name": "Custom_Model",
|
"Name": "Custom_Model",
|
||||||
"Nickname": "Clue Counter",
|
"Nickname": "Clue Counter",
|
||||||
"Snap": true,
|
"Snap": true,
|
||||||
|
@ -45,7 +45,6 @@
|
|||||||
"LuaScript": "require(\"playermat/ClueCounter\")",
|
"LuaScript": "require(\"playermat/ClueCounter\")",
|
||||||
"LuaScriptState": "",
|
"LuaScriptState": "",
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"Memo": "{\"matColor\":\"Red\",\"type\":\"ClueCounter\"}",
|
|
||||||
"Name": "Custom_Model",
|
"Name": "Custom_Model",
|
||||||
"Nickname": "Clue Counter",
|
"Nickname": "Clue Counter",
|
||||||
"Snap": true,
|
"Snap": true,
|
||||||
|
@ -45,7 +45,6 @@
|
|||||||
"LuaScript": "require(\"playermat/ClueCounter\")",
|
"LuaScript": "require(\"playermat/ClueCounter\")",
|
||||||
"LuaScriptState": "",
|
"LuaScriptState": "",
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"Memo": "{\"matColor\":\"White\",\"type\":\"ClueCounter\"}",
|
|
||||||
"Name": "Custom_Model",
|
"Name": "Custom_Model",
|
||||||
"Nickname": "Clue Counter",
|
"Nickname": "Clue Counter",
|
||||||
"Snap": true,
|
"Snap": true,
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
"LuaScript": "require(\"core/GenericCounter\")",
|
"LuaScript": "require(\"core/GenericCounter\")",
|
||||||
"LuaScriptState": "0",
|
"LuaScriptState": "0",
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"Memo": "{\"matColor\":\"Orange\",\"type\":\"ClickableClueCounter\"}",
|
|
||||||
"Name": "Custom_Token",
|
"Name": "Custom_Token",
|
||||||
"Nickname": "Clues",
|
"Nickname": "Clues",
|
||||||
"Snap": true,
|
"Snap": true,
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
"LuaScript": "require(\"core/GenericCounter\")",
|
"LuaScript": "require(\"core/GenericCounter\")",
|
||||||
"LuaScriptState": "0",
|
"LuaScriptState": "0",
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"Memo": "{\"matColor\":\"Red\",\"type\":\"ClickableClueCounter\"}",
|
|
||||||
"Name": "Custom_Token",
|
"Name": "Custom_Token",
|
||||||
"Nickname": "Clues",
|
"Nickname": "Clues",
|
||||||
"Snap": true,
|
"Snap": true,
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
"LuaScript": "require(\"core/GenericCounter\")",
|
"LuaScript": "require(\"core/GenericCounter\")",
|
||||||
"LuaScriptState": "0",
|
"LuaScriptState": "0",
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"Memo": "{\"matColor\":\"Green\",\"type\":\"ClickableClueCounter\"}",
|
|
||||||
"Name": "Custom_Token",
|
"Name": "Custom_Token",
|
||||||
"Nickname": "Clues",
|
"Nickname": "Clues",
|
||||||
"Snap": true,
|
"Snap": true,
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
"LuaScript": "require(\"core/GenericCounter\")",
|
"LuaScript": "require(\"core/GenericCounter\")",
|
||||||
"LuaScriptState": "0",
|
"LuaScriptState": "0",
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"Memo": "{\"matColor\":\"White\",\"type\":\"ClickableClueCounter\"}",
|
|
||||||
"Name": "Custom_Token",
|
"Name": "Custom_Token",
|
||||||
"Nickname": "Clues",
|
"Nickname": "Clues",
|
||||||
"Snap": true,
|
"Snap": true,
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
"LuaScript": "require(\"core/GenericCounter\")",
|
"LuaScript": "require(\"core/GenericCounter\")",
|
||||||
"LuaScriptState": "0",
|
"LuaScriptState": "0",
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"Memo": "{\"matColor\":\"Green\",\"type\":\"DamageCounter\"}",
|
|
||||||
"Name": "Custom_Token",
|
"Name": "Custom_Token",
|
||||||
"Nickname": "Damage\n",
|
"Nickname": "Damage\n",
|
||||||
"Snap": true,
|
"Snap": true,
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
"LuaScript": "require(\"core/GenericCounter\")",
|
"LuaScript": "require(\"core/GenericCounter\")",
|
||||||
"LuaScriptState": "0",
|
"LuaScriptState": "0",
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"Memo": "{\"matColor\":\"Red\",\"type\":\"DamageCounter\"}",
|
|
||||||
"Name": "Custom_Token",
|
"Name": "Custom_Token",
|
||||||
"Nickname": "Damage\n",
|
"Nickname": "Damage\n",
|
||||||
"Snap": true,
|
"Snap": true,
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
"LuaScript": "require(\"core/GenericCounter\")",
|
"LuaScript": "require(\"core/GenericCounter\")",
|
||||||
"LuaScriptState": "0",
|
"LuaScriptState": "0",
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"Memo": "{\"matColor\":\"Orange\",\"type\":\"DamageCounter\"}",
|
|
||||||
"Name": "Custom_Token",
|
"Name": "Custom_Token",
|
||||||
"Nickname": "Damage\n",
|
"Nickname": "Damage\n",
|
||||||
"Snap": true,
|
"Snap": true,
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
"LuaScript": "require(\"core/GenericCounter\")",
|
"LuaScript": "require(\"core/GenericCounter\")",
|
||||||
"LuaScriptState": "0",
|
"LuaScriptState": "0",
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"Memo": "{\"matColor\":\"White\",\"type\":\"DamageCounter\"}",
|
|
||||||
"Name": "Custom_Token",
|
"Name": "Custom_Token",
|
||||||
"Nickname": "Damage\n",
|
"Nickname": "Damage\n",
|
||||||
"Snap": true,
|
"Snap": true,
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
"LuaScript": "require(\"core/DataHelper\")",
|
"LuaScript": "require(\"core/DataHelper\")",
|
||||||
"LuaScriptState": "[]",
|
"LuaScriptState": "[]",
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"Memo": "{\"matColor\":\"Mythos\",\"type\":\"DataHelper\"}",
|
|
||||||
"Name": "Custom_Tile",
|
"Name": "Custom_Tile",
|
||||||
"Nickname": "Data Helper",
|
"Nickname": "Data Helper",
|
||||||
"Snap": true,
|
"Snap": true,
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
"LuaScript": "require(\"core/DoomCounter\")",
|
"LuaScript": "require(\"core/DoomCounter\")",
|
||||||
"LuaScriptState": "[0,{\"Agenda\":true,\"Playarea\":true,\"Playermats\":true}]",
|
"LuaScriptState": "[0,{\"Agenda\":true,\"Playarea\":true,\"Playermats\":true}]",
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"Memo": "{\"matColor\":\"Mythos\",\"type\":\"DoomCounter\"}",
|
|
||||||
"Name": "Custom_Token",
|
"Name": "Custom_Token",
|
||||||
"Nickname": "Doom Counter",
|
"Nickname": "Doom Counter",
|
||||||
"Snap": true,
|
"Snap": true,
|
||||||
|
48
objects/GUIDReferenceHandler.da23e4.json
Normal file
48
objects/GUIDReferenceHandler.da23e4.json
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
{
|
||||||
|
"AltLookAngle": {
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"z": 0
|
||||||
|
},
|
||||||
|
"Autoraise": true,
|
||||||
|
"ColorDiffuse": {
|
||||||
|
"b": 0.116,
|
||||||
|
"g": 0.116,
|
||||||
|
"r": 0.716
|
||||||
|
},
|
||||||
|
"Description": "This object handles GUID references to objects.",
|
||||||
|
"DragSelectable": true,
|
||||||
|
"GMNotes": "",
|
||||||
|
"GUID": "da23e4",
|
||||||
|
"Grid": true,
|
||||||
|
"GridProjection": false,
|
||||||
|
"Hands": false,
|
||||||
|
"HideWhenFaceDown": false,
|
||||||
|
"IgnoreFoW": false,
|
||||||
|
"LayoutGroupSortIndex": 0,
|
||||||
|
"Locked": true,
|
||||||
|
"LuaScript": "require(\"core/GUIDReferenceHandler\")",
|
||||||
|
"LuaScriptState": "",
|
||||||
|
"MeasureMovement": false,
|
||||||
|
"Name": "go_game_piece_white",
|
||||||
|
"Nickname": "GUID Reference Handler",
|
||||||
|
"Snap": true,
|
||||||
|
"Sticky": true,
|
||||||
|
"Tags": [
|
||||||
|
"GUIDs"
|
||||||
|
],
|
||||||
|
"Tooltip": true,
|
||||||
|
"Transform": {
|
||||||
|
"posX": 78,
|
||||||
|
"posY": 1.328,
|
||||||
|
"posZ": -8,
|
||||||
|
"rotX": 0,
|
||||||
|
"rotY": 0,
|
||||||
|
"rotZ": 0,
|
||||||
|
"scaleX": 1,
|
||||||
|
"scaleY": 1,
|
||||||
|
"scaleZ": 1
|
||||||
|
},
|
||||||
|
"Value": 0,
|
||||||
|
"XmlUI": ""
|
||||||
|
}
|
@ -26,7 +26,6 @@
|
|||||||
"LuaScript": "",
|
"LuaScript": "",
|
||||||
"LuaScriptState": "",
|
"LuaScriptState": "",
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"Memo": "{\"matColor\":\"Green\",\"type\":\"HandZone\"}",
|
|
||||||
"Name": "HandTrigger",
|
"Name": "HandTrigger",
|
||||||
"Nickname": "",
|
"Nickname": "",
|
||||||
"Snap": true,
|
"Snap": true,
|
||||||
|
@ -26,7 +26,6 @@
|
|||||||
"LuaScript": "",
|
"LuaScript": "",
|
||||||
"LuaScriptState": "",
|
"LuaScriptState": "",
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"Memo": "{\"matColor\":\"Orange\",\"type\":\"HandZone\"}",
|
|
||||||
"Name": "HandTrigger",
|
"Name": "HandTrigger",
|
||||||
"Nickname": "",
|
"Nickname": "",
|
||||||
"Snap": true,
|
"Snap": true,
|
||||||
|
@ -26,7 +26,6 @@
|
|||||||
"LuaScript": "",
|
"LuaScript": "",
|
||||||
"LuaScriptState": "",
|
"LuaScriptState": "",
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"Memo": "{\"matColor\":\"White\",\"type\":\"HandZone\"}",
|
|
||||||
"Name": "HandTrigger",
|
"Name": "HandTrigger",
|
||||||
"Nickname": "",
|
"Nickname": "",
|
||||||
"Snap": true,
|
"Snap": true,
|
||||||
|
@ -26,7 +26,6 @@
|
|||||||
"LuaScript": "",
|
"LuaScript": "",
|
||||||
"LuaScriptState": "",
|
"LuaScriptState": "",
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"Memo": "{\"matColor\":\"Red\",\"type\":\"HandZone\"}",
|
|
||||||
"Name": "HandTrigger",
|
"Name": "HandTrigger",
|
||||||
"Nickname": "",
|
"Nickname": "",
|
||||||
"Snap": true,
|
"Snap": true,
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
"LuaScript": "require(\"core/GenericCounter\")",
|
"LuaScript": "require(\"core/GenericCounter\")",
|
||||||
"LuaScriptState": "0",
|
"LuaScriptState": "0",
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"Memo": "{\"matColor\":\"Orange\",\"type\":\"HorrorCounter\"}",
|
|
||||||
"Name": "Custom_Token",
|
"Name": "Custom_Token",
|
||||||
"Nickname": "Horror",
|
"Nickname": "Horror",
|
||||||
"Snap": true,
|
"Snap": true,
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
"LuaScript": "require(\"core/GenericCounter\")",
|
"LuaScript": "require(\"core/GenericCounter\")",
|
||||||
"LuaScriptState": "0",
|
"LuaScriptState": "0",
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"Memo": "{\"matColor\":\"White\",\"type\":\"HorrorCounter\"}",
|
|
||||||
"Name": "Custom_Token",
|
"Name": "Custom_Token",
|
||||||
"Nickname": "Horror",
|
"Nickname": "Horror",
|
||||||
"Snap": true,
|
"Snap": true,
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
"LuaScript": "require(\"core/GenericCounter\")",
|
"LuaScript": "require(\"core/GenericCounter\")",
|
||||||
"LuaScriptState": "0",
|
"LuaScriptState": "0",
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"Memo": "{\"matColor\":\"Green\",\"type\":\"HorrorCounter\"}",
|
|
||||||
"Name": "Custom_Token",
|
"Name": "Custom_Token",
|
||||||
"Nickname": "Horror",
|
"Nickname": "Horror",
|
||||||
"Snap": true,
|
"Snap": true,
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
"LuaScript": "require(\"core/GenericCounter\")",
|
"LuaScript": "require(\"core/GenericCounter\")",
|
||||||
"LuaScriptState": "0",
|
"LuaScriptState": "0",
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"Memo": "{\"matColor\":\"Red\",\"type\":\"HorrorCounter\"}",
|
|
||||||
"Name": "Custom_Token",
|
"Name": "Custom_Token",
|
||||||
"Nickname": "Horror",
|
"Nickname": "Horror",
|
||||||
"Snap": true,
|
"Snap": true,
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
"LuaScript": "require(\"core/ActiveInvestigatorCounter\")",
|
"LuaScript": "require(\"core/ActiveInvestigatorCounter\")",
|
||||||
"LuaScriptState": "2",
|
"LuaScriptState": "2",
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"Memo": "{\"matColor\":\"Mythos\",\"type\":\"InvestigatorCounter\"}",
|
|
||||||
"Name": "Custom_Token",
|
"Name": "Custom_Token",
|
||||||
"Nickname": "Investigator Count",
|
"Nickname": "Investigator Count",
|
||||||
"Snap": true,
|
"Snap": true,
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
"LuaScript": "require(\"playermat/InvestigatorSkillTracker\")",
|
"LuaScript": "require(\"playermat/InvestigatorSkillTracker\")",
|
||||||
"LuaScriptState": "[1,1,1,1]",
|
"LuaScriptState": "[1,1,1,1]",
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"Memo": "{\"matColor\":\"Green\",\"type\":\"InvestigatorSkillTracker\"}",
|
|
||||||
"Name": "Custom_Token",
|
"Name": "Custom_Token",
|
||||||
"Nickname": "Investigator Skill Tracker",
|
"Nickname": "Investigator Skill Tracker",
|
||||||
"Snap": true,
|
"Snap": true,
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
"LuaScript": "require(\"playermat/InvestigatorSkillTracker\")",
|
"LuaScript": "require(\"playermat/InvestigatorSkillTracker\")",
|
||||||
"LuaScriptState": "[1,1,1,1]",
|
"LuaScriptState": "[1,1,1,1]",
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"Memo": "{\"matColor\":\"Orange\",\"type\":\"InvestigatorSkillTracker\"}",
|
|
||||||
"Name": "Custom_Token",
|
"Name": "Custom_Token",
|
||||||
"Nickname": "Investigator Skill Tracker",
|
"Nickname": "Investigator Skill Tracker",
|
||||||
"Snap": true,
|
"Snap": true,
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
"LuaScript": "require(\"playermat/InvestigatorSkillTracker\")",
|
"LuaScript": "require(\"playermat/InvestigatorSkillTracker\")",
|
||||||
"LuaScriptState": "[1,1,1,1]",
|
"LuaScriptState": "[1,1,1,1]",
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"Memo": "{\"matColor\":\"White\",\"type\":\"InvestigatorSkillTracker\"}",
|
|
||||||
"Name": "Custom_Token",
|
"Name": "Custom_Token",
|
||||||
"Nickname": "Investigator Skill Tracker",
|
"Nickname": "Investigator Skill Tracker",
|
||||||
"Snap": true,
|
"Snap": true,
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
"LuaScript": "require(\"playermat/InvestigatorSkillTracker\")",
|
"LuaScript": "require(\"playermat/InvestigatorSkillTracker\")",
|
||||||
"LuaScriptState": "[1,1,1,1]",
|
"LuaScriptState": "[1,1,1,1]",
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"Memo": "{\"matColor\":\"Red\",\"type\":\"InvestigatorSkillTracker\"}",
|
|
||||||
"Name": "Custom_Token",
|
"Name": "Custom_Token",
|
||||||
"Nickname": "Investigator Skill Tracker",
|
"Nickname": "Investigator Skill Tracker",
|
||||||
"Snap": true,
|
"Snap": true,
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
"LuaScript": "require(\"core/MasterClueCounter\")",
|
"LuaScript": "require(\"core/MasterClueCounter\")",
|
||||||
"LuaScriptState": "false",
|
"LuaScriptState": "false",
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"Memo": "{\"matColor\":\"Mythos\",\"type\":\"MasterClueCounter\"}",
|
|
||||||
"Name": "Custom_Token",
|
"Name": "Custom_Token",
|
||||||
"Nickname": "Master Clue Counter",
|
"Nickname": "Master Clue Counter",
|
||||||
"Snap": true,
|
"Snap": true,
|
||||||
|
@ -62,7 +62,6 @@
|
|||||||
"LuaScript": "require(\"core/MythosArea\")",
|
"LuaScript": "require(\"core/MythosArea\")",
|
||||||
"LuaScriptState": "{\"currentScenario\":\"\",\"tokenData\":[],\"useFrontData\":true}",
|
"LuaScriptState": "{\"currentScenario\":\"\",\"tokenData\":[],\"useFrontData\":true}",
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"Memo": "{\"matColor\":\"Mythos\",\"type\":\"MythosArea\"}",
|
|
||||||
"Name": "Custom_Tile",
|
"Name": "Custom_Tile",
|
||||||
"Nickname": "Mythos Area",
|
"Nickname": "Mythos Area",
|
||||||
"Snap": true,
|
"Snap": true,
|
||||||
|
@ -24,7 +24,6 @@
|
|||||||
"LuaScript": "require(\"core/NavigationOverlayHandler\")",
|
"LuaScript": "require(\"core/NavigationOverlayHandler\")",
|
||||||
"LuaScriptState_path": "NavigationOverlayHandler.797ede.luascriptstate",
|
"LuaScriptState_path": "NavigationOverlayHandler.797ede.luascriptstate",
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"Memo": "{\"matColor\":\"Mythos\",\"type\":\"NavigationOverlayHandler\"}",
|
|
||||||
"Name": "go_game_piece_black",
|
"Name": "go_game_piece_black",
|
||||||
"Nickname": "Navigation Overlay Handler",
|
"Nickname": "Navigation Overlay Handler",
|
||||||
"Snap": true,
|
"Snap": true,
|
||||||
|
@ -38,7 +38,6 @@
|
|||||||
"LuaScriptState": "",
|
"LuaScriptState": "",
|
||||||
"MaterialIndex": -1,
|
"MaterialIndex": -1,
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"Memo": "{\"matColor\":\"Mythos\",\"type\":\"OptionPanelSource\"}",
|
|
||||||
"MeshIndex": -1,
|
"MeshIndex": -1,
|
||||||
"Name": "Bag",
|
"Name": "Bag",
|
||||||
"Nickname": "OptionPanel Source",
|
"Nickname": "OptionPanel Source",
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
"LuaScript": "require(\"core/DoomInPlayCounter\")",
|
"LuaScript": "require(\"core/DoomInPlayCounter\")",
|
||||||
"LuaScriptState": "",
|
"LuaScriptState": "",
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"Memo": "{\"matColor\":\"Mythos\",\"type\":\"DoomInPlayCounter\"}",
|
|
||||||
"Name": "Custom_Token",
|
"Name": "Custom_Token",
|
||||||
"Nickname": "Other Doom in Play",
|
"Nickname": "Other Doom in Play",
|
||||||
"Snap": true,
|
"Snap": true,
|
||||||
|
@ -973,7 +973,6 @@
|
|||||||
"LuaScript": "require(\"core/PlayArea\")",
|
"LuaScript": "require(\"core/PlayArea\")",
|
||||||
"LuaScriptState": "{\"trackedLocations\":[]}",
|
"LuaScriptState": "{\"trackedLocations\":[]}",
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"Memo": "{\"matColor\":\"Mythos\",\"type\":\"PlayArea\"}",
|
|
||||||
"Name": "Custom_Token",
|
"Name": "Custom_Token",
|
||||||
"Nickname": "Play Area",
|
"Nickname": "Play Area",
|
||||||
"Snap": true,
|
"Snap": true,
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
"LuaScript": "require(\"playercards/PlayerCardPanel\")",
|
"LuaScript": "require(\"playercards/PlayerCardPanel\")",
|
||||||
"LuaScriptState": "{\"spawnBagState\":{\"placed\":[],\"placedObjects\":[]}}",
|
"LuaScriptState": "{\"spawnBagState\":{\"placed\":[],\"placedObjects\":[]}}",
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"Memo": "{\"matColor\":\"Mythos\",\"type\":\"PlayerCardPanel\"}",
|
|
||||||
"Name": "Custom_Tile",
|
"Name": "Custom_Tile",
|
||||||
"Nickname": "Player Cards",
|
"Nickname": "Player Cards",
|
||||||
"Snap": true,
|
"Snap": true,
|
||||||
|
@ -346,7 +346,7 @@
|
|||||||
"LuaScript": "require(\"playermat/Playmat\")",
|
"LuaScript": "require(\"playermat/Playmat\")",
|
||||||
"LuaScriptState_path": "Playermat1White.8b081b.luascriptstate",
|
"LuaScriptState_path": "Playermat1White.8b081b.luascriptstate",
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"Memo": "{\"matColor\":\"White\",\"type\":\"Playermat\"}",
|
"Memo": "White",
|
||||||
"Name": "Custom_Tile",
|
"Name": "Custom_Tile",
|
||||||
"Nickname": "Playermat 1: White",
|
"Nickname": "Playermat 1: White",
|
||||||
"Snap": true,
|
"Snap": true,
|
||||||
|
@ -346,7 +346,7 @@
|
|||||||
"LuaScript": "require(\"playermat/Playmat\")",
|
"LuaScript": "require(\"playermat/Playmat\")",
|
||||||
"LuaScriptState_path": "Playermat2Orange.bd0ff4.luascriptstate",
|
"LuaScriptState_path": "Playermat2Orange.bd0ff4.luascriptstate",
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"Memo": "{\"matColor\":\"Orange\",\"type\":\"Playermat\"}",
|
"Memo": "Orange",
|
||||||
"Name": "Custom_Tile",
|
"Name": "Custom_Tile",
|
||||||
"Nickname": "Playermat 2: Orange",
|
"Nickname": "Playermat 2: Orange",
|
||||||
"Snap": true,
|
"Snap": true,
|
||||||
|
@ -346,7 +346,7 @@
|
|||||||
"LuaScript": "require(\"playermat/Playmat\")",
|
"LuaScript": "require(\"playermat/Playmat\")",
|
||||||
"LuaScriptState_path": "Playermat3Green.383d8b.luascriptstate",
|
"LuaScriptState_path": "Playermat3Green.383d8b.luascriptstate",
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"Memo": "{\"matColor\":\"Green\",\"type\":\"Playermat\"}",
|
"Memo": "Green",
|
||||||
"Name": "Custom_Tile",
|
"Name": "Custom_Tile",
|
||||||
"Nickname": "Playermat 3: Green",
|
"Nickname": "Playermat 3: Green",
|
||||||
"Snap": true,
|
"Snap": true,
|
||||||
|
@ -346,7 +346,7 @@
|
|||||||
"LuaScript": "require(\"playermat/Playmat\")",
|
"LuaScript": "require(\"playermat/Playmat\")",
|
||||||
"LuaScriptState_path": "Playermat4Red.0840d5.luascriptstate",
|
"LuaScriptState_path": "Playermat4Red.0840d5.luascriptstate",
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"Memo": "{\"matColor\":\"Red\",\"type\":\"Playermat\"}",
|
"Memo": "Red",
|
||||||
"Name": "Custom_Tile",
|
"Name": "Custom_Tile",
|
||||||
"Nickname": "Playermat 4: Red",
|
"Nickname": "Playermat 4: Red",
|
||||||
"Snap": true,
|
"Snap": true,
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
"LuaScript": "require(\"core/GenericCounter\")",
|
"LuaScript": "require(\"core/GenericCounter\")",
|
||||||
"LuaScriptState": "5",
|
"LuaScriptState": "5",
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"Memo": "{\"matColor\":\"White\",\"type\":\"ResourceCounter\"}",
|
|
||||||
"Name": "Custom_Token",
|
"Name": "Custom_Token",
|
||||||
"Nickname": "Resources",
|
"Nickname": "Resources",
|
||||||
"Snap": true,
|
"Snap": true,
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
"LuaScript": "require(\"core/GenericCounter\")",
|
"LuaScript": "require(\"core/GenericCounter\")",
|
||||||
"LuaScriptState": "5",
|
"LuaScriptState": "5",
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"Memo": "{\"matColor\":\"Orange\",\"type\":\"ResourceCounter\"}",
|
|
||||||
"Name": "Custom_Token",
|
"Name": "Custom_Token",
|
||||||
"Nickname": "Resources",
|
"Nickname": "Resources",
|
||||||
"Snap": true,
|
"Snap": true,
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
"LuaScript": "require(\"core/GenericCounter\")",
|
"LuaScript": "require(\"core/GenericCounter\")",
|
||||||
"LuaScriptState": "5",
|
"LuaScriptState": "5",
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"Memo": "{\"matColor\":\"Red\",\"type\":\"ResourceCounter\"}",
|
|
||||||
"Name": "Custom_Token",
|
"Name": "Custom_Token",
|
||||||
"Nickname": "Resources",
|
"Nickname": "Resources",
|
||||||
"Snap": true,
|
"Snap": true,
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
"LuaScript": "require(\"core/GenericCounter\")",
|
"LuaScript": "require(\"core/GenericCounter\")",
|
||||||
"LuaScriptState": "5",
|
"LuaScriptState": "5",
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"Memo": "{\"matColor\":\"Green\",\"type\":\"ResourceCounter\"}",
|
|
||||||
"Name": "Custom_Token",
|
"Name": "Custom_Token",
|
||||||
"Nickname": "Resources",
|
"Nickname": "Resources",
|
||||||
"Snap": true,
|
"Snap": true,
|
||||||
|
@ -39,7 +39,6 @@
|
|||||||
"LuaScriptState": "",
|
"LuaScriptState": "",
|
||||||
"MaterialIndex": -1,
|
"MaterialIndex": -1,
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"Memo": "{\"matColor\":\"Mythos\",\"type\":\"ResourceTokenBag\"}",
|
|
||||||
"MeshIndex": -1,
|
"MeshIndex": -1,
|
||||||
"Name": "Custom_Model_Infinite_Bag",
|
"Name": "Custom_Model_Infinite_Bag",
|
||||||
"Nickname": "Resource tokens",
|
"Nickname": "Resource tokens",
|
||||||
|
@ -30,7 +30,6 @@
|
|||||||
"LuaScript": "",
|
"LuaScript": "",
|
||||||
"LuaScriptState": "",
|
"LuaScriptState": "",
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"Memo": "{\"matColor\":\"Mythos\",\"type\":\"RulesReference\"}",
|
|
||||||
"Name": "Custom_PDF",
|
"Name": "Custom_PDF",
|
||||||
"Nickname": "Rules Reference",
|
"Nickname": "Rules Reference",
|
||||||
"Snap": true,
|
"Snap": true,
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
"LuaScript": "require(\"core/tour/TourStarter\")",
|
"LuaScript": "require(\"core/tour/TourStarter\")",
|
||||||
"LuaScriptState": "",
|
"LuaScriptState": "",
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"Memo": "{\"matColor\":\"Mythos\",\"type\":\"TourStarter\"}",
|
|
||||||
"Name": "Custom_Token",
|
"Name": "Custom_Token",
|
||||||
"Nickname": "SCED Tour",
|
"Nickname": "SCED Tour",
|
||||||
"Snap": true,
|
"Snap": true,
|
||||||
|
@ -25,7 +25,6 @@
|
|||||||
"LuaScript": "",
|
"LuaScript": "",
|
||||||
"LuaScriptState": "",
|
"LuaScriptState": "",
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"Memo": "{\"matColor\":\"Mythos\",\"type\":\"PlayAreaZone\"}",
|
|
||||||
"Name": "ScriptingTrigger",
|
"Name": "ScriptingTrigger",
|
||||||
"Nickname": "",
|
"Nickname": "",
|
||||||
"Snap": true,
|
"Snap": true,
|
||||||
|
@ -31,7 +31,6 @@
|
|||||||
"LuaScript": "",
|
"LuaScript": "",
|
||||||
"LuaScriptState": "",
|
"LuaScriptState": "",
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"Memo": "{\"matColor\":\"Mythos\",\"type\":\"SoundCube\"}",
|
|
||||||
"Name": "Custom_Assetbundle",
|
"Name": "Custom_Assetbundle",
|
||||||
"Nickname": "SoundCube",
|
"Nickname": "SoundCube",
|
||||||
"Snap": true,
|
"Snap": true,
|
||||||
|
@ -45,7 +45,6 @@
|
|||||||
"LuaScript": "require(\"core/DownloadBox\")",
|
"LuaScript": "require(\"core/DownloadBox\")",
|
||||||
"LuaScriptState": "",
|
"LuaScriptState": "",
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"Memo": "{\"matColor\":\"Mythos\",\"type\":\"CampaignThePathToCarcosa\"}",
|
|
||||||
"Name": "Custom_Model",
|
"Name": "Custom_Model",
|
||||||
"Nickname": "The Path to Carcosa",
|
"Nickname": "The Path to Carcosa",
|
||||||
"Snap": true,
|
"Snap": true,
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
"LuaScript": "require(\"accessories/TokenArranger\")",
|
"LuaScript": "require(\"accessories/TokenArranger\")",
|
||||||
"LuaScriptState_path": "TokenArranger.022907.luascriptstate",
|
"LuaScriptState_path": "TokenArranger.022907.luascriptstate",
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"Memo": "{\"matColor\":\"Mythos\",\"type\":\"TokenArranger\"}",
|
|
||||||
"Name": "Custom_Token",
|
"Name": "Custom_Token",
|
||||||
"Nickname": "Token Arranger",
|
"Nickname": "Token Arranger",
|
||||||
"Snap": true,
|
"Snap": true,
|
||||||
|
@ -37,7 +37,6 @@
|
|||||||
"LuaScriptState": "",
|
"LuaScriptState": "",
|
||||||
"MaterialIndex": -1,
|
"MaterialIndex": -1,
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"Memo": "{\"matColor\":\"Mythos\",\"type\":\"TokenSource\"}",
|
|
||||||
"MeshIndex": -1,
|
"MeshIndex": -1,
|
||||||
"Name": "Bag",
|
"Name": "Bag",
|
||||||
"Nickname": "Token Source",
|
"Nickname": "Token Source",
|
||||||
|
@ -24,7 +24,6 @@
|
|||||||
"LuaScript": "require(\"core/token/TokenSpawnTracker\")",
|
"LuaScript": "require(\"core/token/TokenSpawnTracker\")",
|
||||||
"LuaScriptState": "{\"cards\":[]}",
|
"LuaScriptState": "{\"cards\":[]}",
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"Memo": "{\"matColor\":\"Mythos\",\"type\":\"TokenSpawnTracker\"}",
|
|
||||||
"Name": "Checker_white",
|
"Name": "Checker_white",
|
||||||
"Nickname": "Token Spawn Tracker",
|
"Nickname": "Token Spawn Tracker",
|
||||||
"Snap": true,
|
"Snap": true,
|
||||||
|
@ -38,7 +38,6 @@
|
|||||||
"LuaScriptState": "",
|
"LuaScriptState": "",
|
||||||
"MaterialIndex": -1,
|
"MaterialIndex": -1,
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"Memo": "{\"matColor\":\"White\",\"type\":\"Trash\"}",
|
|
||||||
"MeshIndex": -1,
|
"MeshIndex": -1,
|
||||||
"Name": "Custom_Model_Bag",
|
"Name": "Custom_Model_Bag",
|
||||||
"Nickname": "Trash",
|
"Nickname": "Trash",
|
||||||
|
@ -38,7 +38,6 @@
|
|||||||
"LuaScriptState": "",
|
"LuaScriptState": "",
|
||||||
"MaterialIndex": -1,
|
"MaterialIndex": -1,
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"Memo": "{\"matColor\":\"Red\",\"type\":\"Trash\"}",
|
|
||||||
"MeshIndex": -1,
|
"MeshIndex": -1,
|
||||||
"Name": "Custom_Model_Bag",
|
"Name": "Custom_Model_Bag",
|
||||||
"Nickname": "Trash",
|
"Nickname": "Trash",
|
||||||
|
@ -38,7 +38,6 @@
|
|||||||
"LuaScriptState": "",
|
"LuaScriptState": "",
|
||||||
"MaterialIndex": -1,
|
"MaterialIndex": -1,
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"Memo": "{\"matColor\":\"Green\",\"type\":\"Trash\"}",
|
|
||||||
"MeshIndex": -1,
|
"MeshIndex": -1,
|
||||||
"Name": "Custom_Model_Bag",
|
"Name": "Custom_Model_Bag",
|
||||||
"Nickname": "Trash",
|
"Nickname": "Trash",
|
||||||
|
@ -38,7 +38,6 @@
|
|||||||
"LuaScriptState": "",
|
"LuaScriptState": "",
|
||||||
"MaterialIndex": -1,
|
"MaterialIndex": -1,
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"Memo": "{\"matColor\":\"Mythos\",\"type\":\"Trash\"}",
|
|
||||||
"MeshIndex": -1,
|
"MeshIndex": -1,
|
||||||
"Name": "Custom_Model_Bag",
|
"Name": "Custom_Model_Bag",
|
||||||
"Nickname": "Trash",
|
"Nickname": "Trash",
|
||||||
|
@ -38,7 +38,6 @@
|
|||||||
"LuaScriptState": "",
|
"LuaScriptState": "",
|
||||||
"MaterialIndex": -1,
|
"MaterialIndex": -1,
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"Memo": "{\"matColor\":\"Orange\",\"type\":\"Trash\"}",
|
|
||||||
"MeshIndex": -1,
|
"MeshIndex": -1,
|
||||||
"Name": "Custom_Model_Bag",
|
"Name": "Custom_Model_Bag",
|
||||||
"Nickname": "Trash",
|
"Nickname": "Trash",
|
||||||
|
@ -158,7 +158,6 @@
|
|||||||
"LuaScript": "require(\"core/VictoryDisplay\")",
|
"LuaScript": "require(\"core/VictoryDisplay\")",
|
||||||
"LuaScriptState": "",
|
"LuaScriptState": "",
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"Memo": "{\"matColor\":\"Mythos\",\"type\":\"VictoryDisplay\"}",
|
|
||||||
"Name": "Custom_Token",
|
"Name": "Custom_Token",
|
||||||
"Nickname": "Victory Display",
|
"Nickname": "Victory Display",
|
||||||
"Snap": false,
|
"Snap": false,
|
||||||
|
@ -5,6 +5,8 @@ local optionPanelApi = require("core/OptionPanelApi")
|
|||||||
local playAreaApi = require("core/PlayAreaApi")
|
local playAreaApi = require("core/PlayAreaApi")
|
||||||
local playmatApi = require("playermat/PlaymatApi")
|
local playmatApi = require("playermat/PlaymatApi")
|
||||||
|
|
||||||
|
local guidHandler = getObjectsWithTag("GUIDs")[1]
|
||||||
|
|
||||||
local campaignTokenData = {
|
local campaignTokenData = {
|
||||||
Name = "Custom_Model",
|
Name = "Custom_Model",
|
||||||
Transform = {
|
Transform = {
|
||||||
@ -163,7 +165,8 @@ function createCampaignFromToken(importData)
|
|||||||
Wait.time(function() optionPanelApi.loadSettings(importData["options"]) end, 0.5)
|
Wait.time(function() optionPanelApi.loadSettings(importData["options"]) end, 0.5)
|
||||||
|
|
||||||
-- destroy Tour Starter token
|
-- destroy Tour Starter token
|
||||||
getObjectsWithTag("TourStarter")[1].destruct()
|
local tourStarter = guidHandler.call("getObjectByOwnerAndType", { owner = "Mythos", type = "TourStarter" })
|
||||||
|
tourStarter.destruct()
|
||||||
|
|
||||||
-- restore PlayArea image
|
-- restore PlayArea image
|
||||||
playAreaApi.updateSurface(importData["playmat"])
|
playAreaApi.updateSurface(importData["playmat"])
|
||||||
|
@ -10,6 +10,8 @@ local playmatApi = require("playermat/PlaymatApi")
|
|||||||
local soundCubeApi = require("core/SoundCubeApi")
|
local soundCubeApi = require("core/SoundCubeApi")
|
||||||
local tokenSpawnTrackerApi = require("core/token/TokenSpawnTrackerApi")
|
local tokenSpawnTrackerApi = require("core/token/TokenSpawnTrackerApi")
|
||||||
|
|
||||||
|
local guidHandler = getObjectsWithTag("GUIDs")[1]
|
||||||
|
|
||||||
-- objects with this tag will be ignored
|
-- objects with this tag will be ignored
|
||||||
local IGNORE_TAG = "CleanUpHelper_ignore"
|
local IGNORE_TAG = "CleanUpHelper_ignore"
|
||||||
|
|
||||||
@ -143,7 +145,7 @@ end
|
|||||||
|
|
||||||
-- reset doom on agenda
|
-- reset doom on agenda
|
||||||
function resetDoomCounter()
|
function resetDoomCounter()
|
||||||
local doomCounter = getObjectsWithTag("DoomCounter")[1]
|
local doomCounter = guidHandler.call("getObjectByOwnerAndType", { owner = "Mythos", type = "DoomCounter" })
|
||||||
if doomCounter ~= nil then
|
if doomCounter ~= nil then
|
||||||
doomCounter.call("updateVal")
|
doomCounter.call("updateVal")
|
||||||
else
|
else
|
||||||
@ -228,7 +230,7 @@ end
|
|||||||
function discardHands()
|
function discardHands()
|
||||||
if not options["tidyPlayermats"] then return end
|
if not options["tidyPlayermats"] then return end
|
||||||
for i = 1, 4 do
|
for i = 1, 4 do
|
||||||
local trash = getObjectsWithAllTags({COLORS[i], "Trash"})
|
local trash = guidHandler.call("getObjectByOwnerAndType", { owner = COLORS[i], type = "Trash" })
|
||||||
if trash == nil then return end
|
if trash == nil then return end
|
||||||
local hand = Player[playmatApi.getPlayerColor(COLORS[i])].getHandObjects()
|
local hand = Player[playmatApi.getPlayerColor(COLORS[i])].getHandObjects()
|
||||||
for j = #hand, 1, -1 do
|
for j = #hand, 1, -1 do
|
||||||
@ -239,8 +241,8 @@ end
|
|||||||
|
|
||||||
-- clean up for play area
|
-- clean up for play area
|
||||||
function tidyPlayareaCoroutine()
|
function tidyPlayareaCoroutine()
|
||||||
local trash = getObjectsWithAllTags({"Mythos", "Trash"})
|
local trash = guidHandler.call("getObjectByOwnerAndType", { owner = "Mythos", type = "Trash" })
|
||||||
local playAreaZone = getObjectsWithTag("PlayAreaZone")[1]
|
local playAreaZone = guidHandler.call("getObjectByOwnerAndType", { owner = "Mythos", type = "PlayAreaZone" })
|
||||||
|
|
||||||
if playAreaZone == nil then
|
if playAreaZone == nil then
|
||||||
printToAll("Scripting zone for main play area could not be found!", "Red")
|
printToAll("Scripting zone for main play area could not be found!", "Red")
|
||||||
@ -270,7 +272,7 @@ function tidyPlayerMatCoroutine()
|
|||||||
for k = 1, 30 do coroutine.yield(0) end
|
for k = 1, 30 do coroutine.yield(0) end
|
||||||
|
|
||||||
-- get respective trash
|
-- get respective trash
|
||||||
local trash = getObjectsWithAllTags({COLORS[i], "Trash"})
|
local trash = guidHandler.call("getObjectByOwnerAndType", { owner = COLORS[i], type = "Trash" })
|
||||||
if trash == nil then
|
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!", "Red")
|
||||||
return 1
|
return 1
|
||||||
@ -300,7 +302,7 @@ function tidyPlayerMatCoroutine()
|
|||||||
|
|
||||||
-- reset "activeInvestigatorId"
|
-- reset "activeInvestigatorId"
|
||||||
if i < 5 then
|
if i < 5 then
|
||||||
local playermat = getObjectsWithAllTags({COLORS[i], "Playermat"})
|
local playermat = guidHandler.call("getObjectByOwnerAndType", { owner = COLORS[i], type = "Playermat" })
|
||||||
if playermat then
|
if playermat then
|
||||||
playermat.setVar("activeInvestigatorId", "00000")
|
playermat.setVar("activeInvestigatorId", "00000")
|
||||||
end
|
end
|
||||||
@ -308,7 +310,7 @@ function tidyPlayerMatCoroutine()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local datahelper = getObjectsWithTag("DataHelper")[1]
|
local datahelper = guidHandler.call("getObjectByOwnerAndType", { owner = "Mythos", type = "DataHelper" })
|
||||||
if datahelper then
|
if datahelper then
|
||||||
datahelper.setTable("SPAWNED_PLAYER_CARD_GUIDS", {})
|
datahelper.setTable("SPAWNED_PLAYER_CARD_GUIDS", {})
|
||||||
end
|
end
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
do
|
do
|
||||||
local TokenArrangerApi = {}
|
local TokenArrangerApi = {}
|
||||||
|
local guidHandler = getObjectsWithTag("GUIDs")[1]
|
||||||
|
|
||||||
-- local function to call the token arranger, if it is on the table
|
-- local function to call the token arranger, if it is on the table
|
||||||
---@param functionName String Name of the function to cal
|
---@param functionName String Name of the function to cal
|
||||||
---@param argument Variant Parameter to pass
|
---@param argument Variant Parameter to pass
|
||||||
local function callIfExistent(functionName, argument)
|
local function callIfExistent(functionName, argument)
|
||||||
local tokenArranger = getObjectsWithTag("TokenArranger")[1]
|
local tokenArranger = guidHandler.call("getObjectByOwnerAndType", { owner = "Mythos", type = "TokenArranger" })
|
||||||
if tokenArranger ~= nil then
|
if tokenArranger ~= nil then
|
||||||
tokenArranger.call(functionName, argument)
|
tokenArranger.call(functionName, argument)
|
||||||
end
|
end
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
do
|
do
|
||||||
local DeckImporterApi = {}
|
local DeckImporterApi = {}
|
||||||
|
local guidHandler = getObjectsWithTag("GUIDs")[1]
|
||||||
|
|
||||||
-- Returns a table with the full state of the UI, including options and deck IDs.
|
-- Returns a table with the full state of the UI, including options and deck IDs.
|
||||||
-- This can be used to persist via onSave(), or provide values for a load operation
|
-- This can be used to persist via onSave(), or provide values for a load operation
|
||||||
@ -13,7 +14,7 @@ do
|
|||||||
-- investigators: True if investigator cards should be spawned
|
-- investigators: True if investigator cards should be spawned
|
||||||
DeckImporterApi.getUiState = function()
|
DeckImporterApi.getUiState = function()
|
||||||
local passthroughTable = {}
|
local passthroughTable = {}
|
||||||
local DeckImporter = getObjectsWithTag("DeckImporter")[1]
|
local DeckImporter = guidHandler.call("getObjectByOwnerAndType", { owner = "Mythos", type = "DeckImporter" })
|
||||||
for k,v in pairs(DeckImporter.call("getUiState")) do
|
for k,v in pairs(DeckImporter.call("getUiState")) do
|
||||||
passthroughTable[k] = v
|
passthroughTable[k] = v
|
||||||
end
|
end
|
||||||
@ -31,7 +32,7 @@ do
|
|||||||
-- loadNewest: True if the most upgraded version of the deck should be loaded
|
-- loadNewest: True if the most upgraded version of the deck should be loaded
|
||||||
-- investigators: True if investigator cards should be spawned
|
-- investigators: True if investigator cards should be spawned
|
||||||
DeckImporterApi.setUiState = function(uiStateTable)
|
DeckImporterApi.setUiState = function(uiStateTable)
|
||||||
local DeckImporter = getObjectsWithTag("DeckImporter")[1]
|
local DeckImporter = guidHandler.call("getObjectByOwnerAndType", { owner = "Mythos", type = "DeckImporter" })
|
||||||
return DeckImporter.call("setUiState", uiStateTable)
|
return DeckImporter.call("setUiState", uiStateTable)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
do
|
do
|
||||||
local BlessCurseManagerApi = {}
|
local BlessCurseManagerApi = {}
|
||||||
local internal = {}
|
local guidHandler = getObjectsWithTag("GUIDs")[1]
|
||||||
|
|
||||||
internal.getManager = function()
|
local function getManager()
|
||||||
return getObjectsWithTag("BlessCurseManager")[1]
|
return guidHandler.call("getObjectByOwnerAndType", { owner = "Mythos", type = "BlessCurseManager" })
|
||||||
end
|
end
|
||||||
|
|
||||||
-- removes all taken tokens and resets the counts
|
-- removes all taken tokens and resets the counts
|
||||||
BlessCurseManagerApi.removeTakenTokensAndReset = function()
|
BlessCurseManagerApi.removeTakenTokensAndReset = function()
|
||||||
local BlessCurseManager = internal.getManager()
|
local BlessCurseManager = getManager()
|
||||||
Wait.time(function() BlessCurseManager.call("removeTakenTokens", "Bless") end, 0.05)
|
Wait.time(function() BlessCurseManager.call("removeTakenTokens", "Bless") end, 0.05)
|
||||||
Wait.time(function() BlessCurseManager.call("removeTakenTokens", "Curse") end, 0.10)
|
Wait.time(function() BlessCurseManager.call("removeTakenTokens", "Curse") end, 0.10)
|
||||||
Wait.time(function() BlessCurseManager.call("doReset", "White") end, 0.15)
|
Wait.time(function() BlessCurseManager.call("doReset", "White") end, 0.15)
|
||||||
@ -16,30 +16,30 @@ do
|
|||||||
|
|
||||||
-- updates the internal count (called by cards that seal bless/curse tokens)
|
-- updates the internal count (called by cards that seal bless/curse tokens)
|
||||||
BlessCurseManagerApi.sealedToken = function(type, guid)
|
BlessCurseManagerApi.sealedToken = function(type, guid)
|
||||||
internal.getManager().call("sealedToken", { type = type, guid = guid })
|
getManager().call("sealedToken", { type = type, guid = guid })
|
||||||
end
|
end
|
||||||
|
|
||||||
-- updates the internal count (called by cards that seal bless/curse tokens)
|
-- updates the internal count (called by cards that seal bless/curse tokens)
|
||||||
BlessCurseManagerApi.releasedToken = function(type, guid)
|
BlessCurseManagerApi.releasedToken = function(type, guid)
|
||||||
internal.getManager().call("releasedToken", { type = type, guid = guid })
|
getManager().call("releasedToken", { type = type, guid = guid })
|
||||||
end
|
end
|
||||||
|
|
||||||
-- broadcasts the current status for bless/curse tokens
|
-- broadcasts the current status for bless/curse tokens
|
||||||
---@param playerColor String Color of the player to show the broadcast to
|
---@param playerColor String Color of the player to show the broadcast to
|
||||||
BlessCurseManagerApi.broadcastStatus = function(playerColor)
|
BlessCurseManagerApi.broadcastStatus = function(playerColor)
|
||||||
internal.getManager().call("broadcastStatus", playerColor)
|
getManager().call("broadcastStatus", playerColor)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- removes all bless / curse tokens from the chaos bag and play
|
-- removes all bless / curse tokens from the chaos bag and play
|
||||||
---@param playerColor String Color of the player to show the broadcast to
|
---@param playerColor String Color of the player to show the broadcast to
|
||||||
BlessCurseManagerApi.removeAll = function(playerColor)
|
BlessCurseManagerApi.removeAll = function(playerColor)
|
||||||
internal.getManager().call("doRemove", playerColor)
|
getManager().call("doRemove", playerColor)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- adds Wendy's menu to the hovered card (allows sealing of tokens)
|
-- adds Wendy's menu to the hovered card (allows sealing of tokens)
|
||||||
---@param color String Color of the player to show the broadcast to
|
---@param color String Color of the player to show the broadcast to
|
||||||
BlessCurseManagerApi.addWendysMenu = function(playerColor, hoveredObject)
|
BlessCurseManagerApi.addWendysMenu = function(playerColor, hoveredObject)
|
||||||
internal.getManager().call("addMenuOptions", { playerColor = playerColor, hoveredObject = hoveredObject })
|
getManager().call("addMenuOptions", { playerColor = playerColor, hoveredObject = hoveredObject })
|
||||||
end
|
end
|
||||||
|
|
||||||
return BlessCurseManagerApi
|
return BlessCurseManagerApi
|
||||||
|
@ -4,6 +4,7 @@ local options = {
|
|||||||
Playarea = true,
|
Playarea = true,
|
||||||
Playermats = true
|
Playermats = true
|
||||||
}
|
}
|
||||||
|
local guidHandler = getObjectsWithTag("GUIDs")[1]
|
||||||
|
|
||||||
val = 0
|
val = 0
|
||||||
|
|
||||||
@ -64,7 +65,7 @@ function startReset()
|
|||||||
if options.Agenda then
|
if options.Agenda then
|
||||||
updateVal(0)
|
updateVal(0)
|
||||||
end
|
end
|
||||||
local DoomInPlayCounter = getObjectsWithTag("DoomInPlayCounter")[1]
|
local DoomInPlayCounter = guidHandler.call("getObjectByOwnerAndType", { owner = "Mythos", type = "DoomInPlayCounter" })
|
||||||
if DoomInPlayCounter then
|
if DoomInPlayCounter then
|
||||||
DoomInPlayCounter.call("removeDoom", options)
|
DoomInPlayCounter.call("removeDoom", options)
|
||||||
end
|
end
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
local playmatApi = require("playermat/PlaymatApi")
|
local playmatApi = require("playermat/PlaymatApi")
|
||||||
|
|
||||||
|
local guidHandler = getObjectsWithTag("GUIDs")[1]
|
||||||
|
|
||||||
local ZONE, TRASH, loopID
|
local ZONE, TRASH, loopID
|
||||||
local doomURL = "https://i.imgur.com/EoL7yaZ.png"
|
local doomURL = "https://i.imgur.com/EoL7yaZ.png"
|
||||||
local IGNORE_TAG = "DoomCounter_ignore"
|
local IGNORE_TAG = "DoomCounter_ignore"
|
||||||
@ -29,8 +31,8 @@ function onLoad()
|
|||||||
color = { 0, 0, 0, 0 }
|
color = { 0, 0, 0, 0 }
|
||||||
})
|
})
|
||||||
|
|
||||||
TRASH = getObjectsWithAllTags({"Mythos", "Trash"})
|
TRASH = guidHandler.call("getObjectByOwnerAndType", { owner = "Mythos", type = "Trash" })
|
||||||
ZONE = getObjectsWithAllTags({"Mythos", "PlayAreaZone" })
|
ZONE = guidHandler.call("getObjectByOwnerAndType", { owner = "Mythos", type = "PlayAreaZone" })
|
||||||
loopID = Wait.time(countDoom, 2, -1)
|
loopID = Wait.time(countDoom, 2, -1)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
99
src/core/GUIDReferenceHandler.ttslua
Normal file
99
src/core/GUIDReferenceHandler.ttslua
Normal file
@ -0,0 +1,99 @@
|
|||||||
|
local GuidReferences = {
|
||||||
|
White = {
|
||||||
|
ClueCounter = "d86b7c",
|
||||||
|
ClickableClueCounter = "db85d6",
|
||||||
|
DamageCounter = "eb08d6",
|
||||||
|
HandZone = "a70eee",
|
||||||
|
HorrorCounter = "468e88",
|
||||||
|
InvestigatorSkillTracker = "e598c2",
|
||||||
|
Playermat = "8b081b",
|
||||||
|
ResourceCounter = "4406f0",
|
||||||
|
Trash = "147e80"
|
||||||
|
},
|
||||||
|
Orange = {
|
||||||
|
ClueCounter = "1769ed",
|
||||||
|
ClickableClueCounter = "3f22e5",
|
||||||
|
DamageCounter = "e64eec",
|
||||||
|
HandZone = "5fe087",
|
||||||
|
HorrorCounter = "0257d9",
|
||||||
|
InvestigatorSkillTracker = "b4a5f7",
|
||||||
|
Playermat = "bd0ff4",
|
||||||
|
ResourceCounter = "816d84",
|
||||||
|
Trash = "f7b6c8"
|
||||||
|
},
|
||||||
|
Green = {
|
||||||
|
ClueCounter = "032300",
|
||||||
|
ClickableClueCounter = "891403",
|
||||||
|
DamageCounter = "1f5a0a",
|
||||||
|
HandZone = "0285cc",
|
||||||
|
HorrorCounter = "7b5729",
|
||||||
|
InvestigatorSkillTracker = "af7ed7",
|
||||||
|
Playermat = "383d8b",
|
||||||
|
ResourceCounter = "cd15ac",
|
||||||
|
Trash = "5f896a"
|
||||||
|
},
|
||||||
|
Red = {
|
||||||
|
ClueCounter = "37be78",
|
||||||
|
ClickableClueCounter = "4111de",
|
||||||
|
DamageCounter = "591a45",
|
||||||
|
HandZone = "be2f17",
|
||||||
|
HorrorCounter = "beb964",
|
||||||
|
InvestigatorSkillTracker = "e74881",
|
||||||
|
Playermat = "0840d5",
|
||||||
|
ResourceCounter = "a4b60d",
|
||||||
|
Trash = "4b8594"
|
||||||
|
},
|
||||||
|
Mythos = {
|
||||||
|
AllCardsBag = "15bb07",
|
||||||
|
BlessCurseManager = "5933fb",
|
||||||
|
CampaignThePathToCarcosa = "aca04c",
|
||||||
|
DataHelper = "708279",
|
||||||
|
DeckImporter = "a28140",
|
||||||
|
DoomCounter = "85c4c6",
|
||||||
|
DoomInPlayCounter = "652ff3",
|
||||||
|
MasterClueCounter = "4a3aa4",
|
||||||
|
MythosArea = "9f334f",
|
||||||
|
NavigationOverlayHandler = "797ede",
|
||||||
|
OptionPanelSource = "830bd0",
|
||||||
|
PlayArea = "721ba2",
|
||||||
|
PlayAreaZone = "a2f932",
|
||||||
|
PlayerCardPanel = "2d30ee",
|
||||||
|
ResourceTokenBag = "9fadf9",
|
||||||
|
RulesReference = "d99993",
|
||||||
|
SoundCube = "3c988f",
|
||||||
|
TokenArranger = "022907",
|
||||||
|
TokenSource = "124381",
|
||||||
|
TokenSpawnTracker = "e3ffc9",
|
||||||
|
TourStarter = "0e5aa8",
|
||||||
|
Trash = "70b9f6",
|
||||||
|
VictoryDisplay = "6ccd6d"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function getObjectByOwnerAndType(param)
|
||||||
|
local owner = param.owner
|
||||||
|
local type = param.type
|
||||||
|
return getObjectFromGUID(GuidReferences[owner][type])
|
||||||
|
end
|
||||||
|
|
||||||
|
function getObjectsByType(type)
|
||||||
|
local objList = {}
|
||||||
|
for owner, objects in pairs(GuidReferences) do
|
||||||
|
local obj = getObjectFromGUID(objects[type])
|
||||||
|
if obj then
|
||||||
|
objList[owner] = obj
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return objList
|
||||||
|
end
|
||||||
|
|
||||||
|
function getObjectsByOwner(owner)
|
||||||
|
local objList = {}
|
||||||
|
for type, guid in pairs(GuidReferences[owner]) do
|
||||||
|
local obj = getObjectFromGUID(guid)
|
||||||
|
if obj then
|
||||||
|
objList[type] = obj
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return objList
|
||||||
|
end
|
@ -3,6 +3,8 @@ local optionPanelApi = require("core/OptionPanelApi")
|
|||||||
local playmatApi = require("playermat/PlaymatApi")
|
local playmatApi = require("playermat/PlaymatApi")
|
||||||
local victoryDisplayApi = require("core/VictoryDisplayApi")
|
local victoryDisplayApi = require("core/VictoryDisplayApi")
|
||||||
|
|
||||||
|
local guidHandler = getObjectsWithTag("GUIDs")[1]
|
||||||
|
|
||||||
function onLoad()
|
function onLoad()
|
||||||
addHotkey("Add Doom to Agenda", addDoomToAgenda)
|
addHotkey("Add Doom to Agenda", addDoomToAgenda)
|
||||||
addHotkey("Bless/Curse Status", showBlessCurseStatus)
|
addHotkey("Bless/Curse Status", showBlessCurseStatus)
|
||||||
@ -41,7 +43,8 @@ end
|
|||||||
|
|
||||||
-- adds 1 doom to the agenda
|
-- adds 1 doom to the agenda
|
||||||
function addDoomToAgenda()
|
function addDoomToAgenda()
|
||||||
getObjectsWithTag("DoomCounter")[1].call("addVal", 1)
|
local doomCounter = guidHandler.call("getObjectByOwnerAndType", { owner = "Mythos", type = "DoomCounter" })
|
||||||
|
doomCounter.call("addVal", 1)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- moves the hovered card to the victory display
|
-- moves the hovered card to the victory display
|
||||||
|
@ -8,6 +8,8 @@ local tokenArrangerApi = require("accessories/TokenArrangerApi")
|
|||||||
local tokenChecker = require("core/token/TokenChecker")
|
local tokenChecker = require("core/token/TokenChecker")
|
||||||
local tokenManager = require("core/token/TokenManager")
|
local tokenManager = require("core/token/TokenManager")
|
||||||
|
|
||||||
|
local guidHandler = getObjectsWithTag("GUIDs")[1]
|
||||||
|
|
||||||
---------------------------------------------------------
|
---------------------------------------------------------
|
||||||
-- general setup
|
-- general setup
|
||||||
---------------------------------------------------------
|
---------------------------------------------------------
|
||||||
@ -127,7 +129,7 @@ function onLoad(savedData)
|
|||||||
if obj ~= nil then obj.interactable = false end
|
if obj ~= nil then obj.interactable = false end
|
||||||
end
|
end
|
||||||
|
|
||||||
DATA_HELPER = getObjectsWithTag("DataHelper")[1]
|
--DATA_HELPER = guidHandler.call("getObjectByOwnerAndType", { owner = "Mythos", type = "DataHelper" })
|
||||||
resetChaosTokenStatTracker()
|
resetChaosTokenStatTracker()
|
||||||
getModVersion()
|
getModVersion()
|
||||||
math.randomseed(os.time())
|
math.randomseed(os.time())
|
||||||
@ -957,7 +959,7 @@ end
|
|||||||
---@param rotation Table Desired rotation of the object (defaults to object's rotation)
|
---@param rotation Table Desired rotation of the object (defaults to object's rotation)
|
||||||
---@param color String Matcolor this object is spawned for to set memo
|
---@param color String Matcolor this object is spawned for to set memo
|
||||||
function spawnHelperObject(name, position, rotation, color)
|
function spawnHelperObject(name, position, rotation, color)
|
||||||
local sourceBag = getObjectsWithTag("OptionPanelSource")[1]
|
local sourceBag = guidHandler.call("getObjectByOwnerAndType", { owner = "Mythos", type = "OptionPanelSource" })
|
||||||
|
|
||||||
-- error handling for missing sourceBag
|
-- error handling for missing sourceBag
|
||||||
if not sourceBag then
|
if not sourceBag then
|
||||||
|
@ -3,6 +3,8 @@ local tokenArrangerApi = require("accessories/TokenArrangerApi")
|
|||||||
local tokenChecker = require("core/token/TokenChecker")
|
local tokenChecker = require("core/token/TokenChecker")
|
||||||
local tokenSpawnTrackerApi = require("core/token/TokenSpawnTrackerApi")
|
local tokenSpawnTrackerApi = require("core/token/TokenSpawnTrackerApi")
|
||||||
|
|
||||||
|
local guidHandler = getObjectsWithTag("GUIDs")[1]
|
||||||
|
|
||||||
local ENCOUNTER_DECK_AREA = {
|
local ENCOUNTER_DECK_AREA = {
|
||||||
upperLeft = { x = 0.9, z = 0.42 },
|
upperLeft = { x = 0.9, z = 0.42 },
|
||||||
lowerRight = { x = 0.86, z = 0.38 },
|
lowerRight = { x = 0.86, z = 0.38 },
|
||||||
@ -33,8 +35,8 @@ function onLoad(saveState)
|
|||||||
useFrontData = loadedState.useFrontData or true
|
useFrontData = loadedState.useFrontData or true
|
||||||
tokenData = loadedState.tokenData or {}
|
tokenData = loadedState.tokenData or {}
|
||||||
end
|
end
|
||||||
TRASH = getObjectsWithAllTags({"Mythos", "Trash"})
|
TRASH = guidHandler.call("getObjectByOwnerAndType", { owner = "Mythos", type = "Trash" })
|
||||||
DATA_HELPER = getObjectsWithTag("DataHelper")[1]
|
DATA_HELPER = guidHandler.call("getObjectByOwnerAndType", { owner = "Mythos", type = "DataHelper" })
|
||||||
collisionEnabled = true
|
collisionEnabled = true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1,16 +1,19 @@
|
|||||||
do
|
do
|
||||||
local MythosAreaApi = {}
|
local MythosAreaApi = {}
|
||||||
|
local guidHandler = getObjectsWithTag("GUIDs")[1]
|
||||||
|
|
||||||
|
local function getMythosArea()
|
||||||
|
return guidHandler.call("getObjectByOwnerAndType", { owner = "Mythos", type = "MythosArea" })
|
||||||
|
end
|
||||||
|
|
||||||
-- returns the chaos token metadata (if provided through scenario reference card)
|
-- returns the chaos token metadata (if provided through scenario reference card)
|
||||||
MythosAreaApi.returnTokenData = function()
|
MythosAreaApi.returnTokenData = function()
|
||||||
local MythosArea = getObjectsWithTag("MythosArea")[1]
|
getMythosArea().call("returnTokenData")
|
||||||
return MythosArea.call("returnTokenData")
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- draw an encounter card to the requested position/rotation
|
-- draw an encounter card to the requested position/rotation
|
||||||
MythosAreaApi.drawEncounterCard = function(pos, rotY, alwaysFaceUp)
|
MythosAreaApi.drawEncounterCard = function(pos, rotY, alwaysFaceUp)
|
||||||
local MythosArea = getObjectsWithTag("MythosArea")[1]
|
getMythosArea().call("drawEncounterCard", {
|
||||||
MythosArea.call("drawEncounterCard", {
|
|
||||||
pos = pos,
|
pos = pos,
|
||||||
rotY = rotY,
|
rotY = rotY,
|
||||||
alwaysFaceUp = alwaysFaceUp
|
alwaysFaceUp = alwaysFaceUp
|
||||||
|
@ -1,12 +1,16 @@
|
|||||||
do
|
do
|
||||||
local NavigationOverlayApi = {}
|
local NavigationOverlayApi = {}
|
||||||
|
local guidHandler = getObjectsWithTag("GUIDs")[1]
|
||||||
|
|
||||||
|
local function getNOHandler()
|
||||||
|
return guidHandler.call("getObjectByOwnerAndType", { owner = "Mythos", type = "NavigationOverlayHandler" })
|
||||||
|
end
|
||||||
|
|
||||||
-- Copies the visibility for the Navigation overlay
|
-- Copies the visibility for the Navigation overlay
|
||||||
---@param startColor String Color of the player to copy from
|
---@param startColor String Color of the player to copy from
|
||||||
---@param targetColor String Color of the targeted player
|
---@param targetColor String Color of the targeted player
|
||||||
NavigationOverlayApi.copyVisibility = function(startColor, targetColor)
|
NavigationOverlayApi.copyVisibility = function(startColor, targetColor)
|
||||||
local handler = getObjectsWithTag("NavigationOverlayHandler")[1]
|
getNOHandler().call("copyVisibility", {
|
||||||
handler.call("copyVisibility", {
|
|
||||||
startColor = startColor,
|
startColor = startColor,
|
||||||
targetColor = targetColor
|
targetColor = targetColor
|
||||||
})
|
})
|
||||||
@ -15,8 +19,7 @@ do
|
|||||||
-- Changes the Navigation Overlay view ("Full View" --> "Play Areas" --> "Closed" etc.)
|
-- Changes the Navigation Overlay view ("Full View" --> "Play Areas" --> "Closed" etc.)
|
||||||
---@param playerColor String Color of the player to update the visibility for
|
---@param playerColor String Color of the player to update the visibility for
|
||||||
NavigationOverlayApi.cycleVisibility = function(playerColor)
|
NavigationOverlayApi.cycleVisibility = function(playerColor)
|
||||||
local handler = getObjectsWithTag("NavigationOverlayHandler")[1]
|
getNOHandler().call("cycleVisibility", playerColor)
|
||||||
handler.call("cycleVisibility", playerColor)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return NavigationOverlayApi
|
return NavigationOverlayApi
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
-- general setup
|
-- general setup
|
||||||
---------------------------------------------------------
|
---------------------------------------------------------
|
||||||
|
|
||||||
|
local guidHandler = getObjectsWithTag("GUIDs")[1]
|
||||||
|
|
||||||
-- Location connection directional options
|
-- Location connection directional options
|
||||||
local BIDIRECTIONAL = 0
|
local BIDIRECTIONAL = 0
|
||||||
local ONE_WAY = 1
|
local ONE_WAY = 1
|
||||||
@ -506,7 +508,7 @@ function shiftContentsRight(playerColor)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function shiftContents(playerColor, direction)
|
function shiftContents(playerColor, direction)
|
||||||
local zone = getObjectsWithTag("PlayAreaZone")[1]
|
local zone = guidHandler.call("getObjectByOwnerAndType", { owner = "Mythos", type = "PlayAreaZone" })
|
||||||
if not zone then
|
if not zone then
|
||||||
broadcastToColor("Scripting zone couldn't be found.", playerColor, "Red")
|
broadcastToColor("Scripting zone couldn't be found.", playerColor, "Red")
|
||||||
return
|
return
|
||||||
|
@ -1,105 +1,109 @@
|
|||||||
do
|
do
|
||||||
local PlayAreaApi = {}
|
local PlayAreaApi = {}
|
||||||
local internal = {}
|
local guidHandler = getObjectsWithTag("GUIDs")[1]
|
||||||
|
|
||||||
internal.getPlayArea = function()
|
local function getPlayArea()
|
||||||
return getObjectsWithTag("PlayArea")[1]
|
return guidHandler.call("getObjectByOwnerAndType", { owner = "Mythos", type = "PlayArea" })
|
||||||
|
end
|
||||||
|
|
||||||
|
local function getInvestigatorCounter()
|
||||||
|
return guidHandler.call("getObjectByOwnerAndType", { owner = "Mythos", type = "InvestigatorCounter" })
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Returns the current value of the investigator counter from the playmat
|
-- Returns the current value of the investigator counter from the playmat
|
||||||
---@return Integer. Number of investigators currently set on the counter
|
---@return Integer. Number of investigators currently set on the counter
|
||||||
PlayAreaApi.getInvestigatorCount = function()
|
PlayAreaApi.getInvestigatorCount = function()
|
||||||
return getObjectsWithTag("InvestigatorCounter")[1].getVar("val")
|
getInvestigatorCounter().getVar("val")
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Updates the current value of the investigator counter from the playmat
|
-- Updates the current value of the investigator counter from the playmat
|
||||||
---@param count Number of investigators to set on the counter
|
---@param count Number of investigators to set on the counter
|
||||||
PlayAreaApi.setInvestigatorCount = function(count)
|
PlayAreaApi.setInvestigatorCount = function(count)
|
||||||
return getObjectsWithTag("InvestigatorCounter")[1].call("updateVal", count)
|
getInvestigatorCounter().call("updateVal", count)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Move all contents on the play area (cards, tokens, etc) one slot in the given direction. Certain
|
-- Move all contents on the play area (cards, tokens, etc) one slot in the given direction. Certain
|
||||||
-- fixed objects will be ignored, as will anything the player has tagged with 'displacement_excluded'
|
-- fixed objects will be ignored, as will anything the player has tagged with 'displacement_excluded'
|
||||||
---@param playerColor Color Color of the player requesting the shift for messages
|
---@param playerColor Color Color of the player requesting the shift for messages
|
||||||
PlayAreaApi.shiftContentsUp = function(playerColor)
|
PlayAreaApi.shiftContentsUp = function(playerColor)
|
||||||
return internal.getPlayArea().call("shiftContentsUp", playerColor)
|
return getPlayArea().call("shiftContentsUp", playerColor)
|
||||||
end
|
end
|
||||||
|
|
||||||
PlayAreaApi.shiftContentsDown = function(playerColor)
|
PlayAreaApi.shiftContentsDown = function(playerColor)
|
||||||
return internal.getPlayArea().call("shiftContentsDown", playerColor)
|
return getPlayArea().call("shiftContentsDown", playerColor)
|
||||||
end
|
end
|
||||||
|
|
||||||
PlayAreaApi.shiftContentsLeft = function(playerColor)
|
PlayAreaApi.shiftContentsLeft = function(playerColor)
|
||||||
return internal.getPlayArea().call("shiftContentsLeft", playerColor)
|
return getPlayArea().call("shiftContentsLeft", playerColor)
|
||||||
end
|
end
|
||||||
|
|
||||||
PlayAreaApi.shiftContentsRight = function(playerColor)
|
PlayAreaApi.shiftContentsRight = function(playerColor)
|
||||||
return internal.getPlayArea().call("shiftContentsRight", playerColor)
|
return getPlayArea().call("shiftContentsRight", playerColor)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Reset the play area's tracking of which cards have had tokens spawned.
|
-- Reset the play area's tracking of which cards have had tokens spawned.
|
||||||
PlayAreaApi.resetSpawnedCards = function()
|
PlayAreaApi.resetSpawnedCards = function()
|
||||||
return internal.getPlayArea().call("resetSpawnedCards")
|
return getPlayArea().call("resetSpawnedCards")
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Event to be called when the current scenario has changed.
|
-- Event to be called when the current scenario has changed.
|
||||||
---@param scenarioName Name of the new scenario
|
---@param scenarioName Name of the new scenario
|
||||||
PlayAreaApi.onScenarioChanged = function(scenarioName)
|
PlayAreaApi.onScenarioChanged = function(scenarioName)
|
||||||
internal.getPlayArea().call("onScenarioChanged", scenarioName)
|
getPlayArea().call("onScenarioChanged", scenarioName)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Sets this playmat's snap points to limit snapping to locations or not.
|
-- Sets this playmat's snap points to limit snapping to locations or not.
|
||||||
-- If matchTypes is false, snap points will be reset to snap all cards.
|
-- If matchTypes is false, snap points will be reset to snap all cards.
|
||||||
---@param matchTypes Boolean Whether snap points should only snap for the matching card types.
|
---@param matchTypes Boolean Whether snap points should only snap for the matching card types.
|
||||||
PlayAreaApi.setLimitSnapsByType = function(matchCardTypes)
|
PlayAreaApi.setLimitSnapsByType = function(matchCardTypes)
|
||||||
internal.getPlayArea().call("setLimitSnapsByType", matchCardTypes)
|
getPlayArea().call("setLimitSnapsByType", matchCardTypes)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Receiver for the Global tryObjectEnterContainer event. Used to clear vector lines from dragged
|
-- Receiver for the Global tryObjectEnterContainer event. Used to clear vector lines from dragged
|
||||||
-- cards before they're destroyed by entering the container
|
-- cards before they're destroyed by entering the container
|
||||||
PlayAreaApi.tryObjectEnterContainer = function(container, object)
|
PlayAreaApi.tryObjectEnterContainer = function(container, object)
|
||||||
internal.getPlayArea().call("tryObjectEnterContainer", { container = container, object = object })
|
getPlayArea().call("tryObjectEnterContainer", { container = container, object = object })
|
||||||
end
|
end
|
||||||
|
|
||||||
-- counts the VP on locations in the play area
|
-- counts the VP on locations in the play area
|
||||||
PlayAreaApi.countVP = function()
|
PlayAreaApi.countVP = function()
|
||||||
return internal.getPlayArea().call("countVP")
|
return getPlayArea().call("countVP")
|
||||||
end
|
end
|
||||||
|
|
||||||
-- highlights all locations in the play area without metadata
|
-- highlights all locations in the play area without metadata
|
||||||
---@param state Boolean True if highlighting should be enabled
|
---@param state Boolean True if highlighting should be enabled
|
||||||
PlayAreaApi.highlightMissingData = function(state)
|
PlayAreaApi.highlightMissingData = function(state)
|
||||||
return internal.getPlayArea().call("highlightMissingData", state)
|
return getPlayArea().call("highlightMissingData", state)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- highlights all locations in the play area with VP
|
-- highlights all locations in the play area with VP
|
||||||
---@param state Boolean True if highlighting should be enabled
|
---@param state Boolean True if highlighting should be enabled
|
||||||
PlayAreaApi.highlightCountedVP = function(state)
|
PlayAreaApi.highlightCountedVP = function(state)
|
||||||
return internal.getPlayArea().call("highlightCountedVP", state)
|
return getPlayArea().call("highlightCountedVP", state)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Checks if an object is in the play area (returns true or false)
|
-- Checks if an object is in the play area (returns true or false)
|
||||||
PlayAreaApi.isInPlayArea = function(object)
|
PlayAreaApi.isInPlayArea = function(object)
|
||||||
return internal.getPlayArea().call("isInPlayArea", object)
|
return getPlayArea().call("isInPlayArea", object)
|
||||||
end
|
end
|
||||||
|
|
||||||
PlayAreaApi.getSurface = function()
|
PlayAreaApi.getSurface = function()
|
||||||
return internal.getPlayArea().getCustomObject().image
|
return getPlayArea().getCustomObject().image
|
||||||
end
|
end
|
||||||
|
|
||||||
PlayAreaApi.updateSurface = function(url)
|
PlayAreaApi.updateSurface = function(url)
|
||||||
return internal.getPlayArea().call("updateSurface", url)
|
return getPlayArea().call("updateSurface", url)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Called by Custom Data Helpers to push their location data into the Data Helper. This adds the
|
-- Called by Custom Data Helpers to push their location data into the Data Helper. This adds the
|
||||||
-- data to the local token manager instance.
|
-- data to the local token manager instance.
|
||||||
---@param args Table Single-value array holding the GUID of the Custom Data Helper making the call
|
---@param args Table Single-value array holding the GUID of the Custom Data Helper making the call
|
||||||
PlayAreaApi.updateLocations = function(args)
|
PlayAreaApi.updateLocations = function(args)
|
||||||
internal.getPlayArea().call("updateLocations", args)
|
getPlayArea().call("updateLocations", args)
|
||||||
end
|
end
|
||||||
|
|
||||||
PlayAreaApi.getCustomDataHelper = function()
|
PlayAreaApi.getCustomDataHelper = function()
|
||||||
return internal.getPlayArea().getVar("customDataHelper")
|
return getPlayArea().getVar("customDataHelper")
|
||||||
end
|
end
|
||||||
|
|
||||||
return PlayAreaApi
|
return PlayAreaApi
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
do
|
do
|
||||||
local SoundCubeApi = {}
|
local SoundCubeApi = {}
|
||||||
|
local guidHandler = getObjectsWithTag("GUIDs")[1]
|
||||||
|
|
||||||
-- this table links the name of a trigger effect to its index
|
-- this table links the name of a trigger effect to its index
|
||||||
local soundIndices = {
|
local soundIndices = {
|
||||||
@ -9,7 +10,7 @@ do
|
|||||||
}
|
}
|
||||||
|
|
||||||
local function playTriggerEffect(index)
|
local function playTriggerEffect(index)
|
||||||
local SoundCube = getObjectsWithTag("SoundCube")[1]
|
local SoundCube = guidHandler.call("getObjectByOwnerAndType", { owner = "Mythos", type = "SoundCube" })
|
||||||
SoundCube.AssetBundle.playTriggerEffect(index)
|
SoundCube.AssetBundle.playTriggerEffect(index)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -10,12 +10,10 @@ local countedVP = {}
|
|||||||
local highlightMissing = false
|
local highlightMissing = false
|
||||||
local highlightCounted = false
|
local highlightCounted = false
|
||||||
|
|
||||||
local TRASH
|
local guidHandler = getObjectsWithTag("GUIDs")[1]
|
||||||
|
|
||||||
-- button creation when loading the game
|
-- button creation when loading the game
|
||||||
function onLoad()
|
function onLoad()
|
||||||
TRASH = getObjectsWithAllTags({"Mythos", "Trash"})
|
|
||||||
|
|
||||||
-- index 0: VP - "Display"
|
-- index 0: VP - "Display"
|
||||||
local buttonParameters = {}
|
local buttonParameters = {}
|
||||||
buttonParameters.label = "0"
|
buttonParameters.label = "0"
|
||||||
@ -235,8 +233,7 @@ end
|
|||||||
function highlightCountedVP()
|
function highlightCountedVP()
|
||||||
self.editButton({
|
self.editButton({
|
||||||
index = 4,
|
index = 4,
|
||||||
tooltip = (highlightCounted and "Enable" or "Disable") ..
|
tooltip = (highlightCounted and "Enable" or "Disable") .. " highlighting of cards with VP."
|
||||||
" highlighting of cards with VP."
|
|
||||||
})
|
})
|
||||||
for _, obj in pairs(countedVP) do
|
for _, obj in pairs(countedVP) do
|
||||||
if obj ~= nil then
|
if obj ~= nil then
|
||||||
@ -253,6 +250,8 @@ end
|
|||||||
|
|
||||||
-- places the provided card in the first empty spot
|
-- places the provided card in the first empty spot
|
||||||
function placeCard(card)
|
function placeCard(card)
|
||||||
|
local TRASH = guidHandler.call("getObjectByOwnerAndType", { owner = "Mythos", type = "Trash" })
|
||||||
|
|
||||||
-- check snap point states
|
-- check snap point states
|
||||||
local snaps = self.getSnapPoints()
|
local snaps = self.getSnapPoints()
|
||||||
table.sort(snaps, function(a, b) return a.position.x > b.position.x end)
|
table.sort(snaps, function(a, b) return a.position.x > b.position.x end)
|
||||||
|
@ -1,19 +1,22 @@
|
|||||||
do
|
do
|
||||||
local VictoryDisplayApi = {}
|
local VictoryDisplayApi = {}
|
||||||
|
local guidHandler = getObjectsWithTag("GUIDs")[1]
|
||||||
|
|
||||||
|
local function getVictoryDisplay()
|
||||||
|
return guidHandler.call("getObjectByOwnerAndType", { owner = "Mythos", type = "VictoryDisplay" })
|
||||||
|
end
|
||||||
|
|
||||||
-- triggers an update of the Victory count
|
-- triggers an update of the Victory count
|
||||||
---@param delay Number Delay in seconds after which the update call is executed
|
---@param delay Number Delay in seconds after which the update call is executed
|
||||||
VictoryDisplayApi.update = function(delay)
|
VictoryDisplayApi.update = function(delay)
|
||||||
local VictoryDisplay = getObjectsWithTag("VictoryDisplay")[1]
|
getVictoryDisplay().call("startUpdate", delay)
|
||||||
VictoryDisplay.call("startUpdate", delay)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- moves a card to the victory display (in the first empty spot)
|
-- moves a card to the victory display (in the first empty spot)
|
||||||
---@param object Object Object that should be checked and potentially moved
|
---@param object Object Object that should be checked and potentially moved
|
||||||
VictoryDisplayApi.placeCard = function(object)
|
VictoryDisplayApi.placeCard = function(object)
|
||||||
if object ~= nil and object.tag == "Card" then
|
if object ~= nil and object.tag == "Card" then
|
||||||
local VictoryDisplay = getObjectsWithTag("VictoryDisplay")[1]
|
getVictoryDisplay().call("getObjectByOwnerAndType", { owner = "Mythos", type = "VictoryDisplay" }).call("placeCard", object)
|
||||||
VictoryDisplay.call("placeCard", object)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -3,6 +3,8 @@ do
|
|||||||
local playAreaApi = require("core/PlayAreaApi")
|
local playAreaApi = require("core/PlayAreaApi")
|
||||||
local tokenSpawnTrackerApi = require("core/token/TokenSpawnTrackerApi")
|
local tokenSpawnTrackerApi = require("core/token/TokenSpawnTrackerApi")
|
||||||
|
|
||||||
|
local guidHandler = getObjectsWithTag("GUIDs")[1]
|
||||||
|
|
||||||
local PLAYER_CARD_TOKEN_OFFSETS = {
|
local PLAYER_CARD_TOKEN_OFFSETS = {
|
||||||
[1] = {
|
[1] = {
|
||||||
Vector(0, 3, -0.2)
|
Vector(0, 3, -0.2)
|
||||||
@ -335,7 +337,7 @@ do
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
tokenTemplates = { }
|
tokenTemplates = { }
|
||||||
local tokenSource = getObjectsWithTag("TokenSource")[1]
|
local tokenSource = guidHandler.call("getObjectByOwnerAndType", { owner = "Mythos", type = "TokenSource" })
|
||||||
for _, tokenTemplate in ipairs(tokenSource.getData().ContainedObjects) do
|
for _, tokenTemplate in ipairs(tokenSource.getData().ContainedObjects) do
|
||||||
local tokenName = tokenTemplate.Memo
|
local tokenName = tokenTemplate.Memo
|
||||||
tokenTemplates[tokenName] = tokenTemplate
|
tokenTemplates[tokenName] = tokenTemplate
|
||||||
@ -347,7 +349,7 @@ do
|
|||||||
if playerCardData ~= nil then
|
if playerCardData ~= nil then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local dataHelper = getObjectsWithTag("DataHelper")[1]
|
local dataHelper = guidHandler.call("getObjectByOwnerAndType", { owner = "Mythos", type = "DataHelper" })
|
||||||
playerCardData = dataHelper.getTable('PLAYER_CARD_DATA')
|
playerCardData = dataHelper.getTable('PLAYER_CARD_DATA')
|
||||||
locationData = dataHelper.getTable('LOCATIONS_DATA')
|
locationData = dataHelper.getTable('LOCATIONS_DATA')
|
||||||
end
|
end
|
||||||
|
@ -1,33 +1,33 @@
|
|||||||
do
|
do
|
||||||
local TokenSpawnTracker = {}
|
local TokenSpawnTracker = {}
|
||||||
local internal = {}
|
local guidHandler = getObjectsWithTag("GUIDs")[1]
|
||||||
|
|
||||||
internal.getSpawnTracker = function()
|
local function getSpawnTracker()
|
||||||
return getObjectsWithTag("TokenSpawnTracker")[1]
|
return guidHandler.call("getObjectByOwnerAndType", { owner = "Mythos", type = "TokenSpawnTracker" })
|
||||||
end
|
end
|
||||||
|
|
||||||
TokenSpawnTracker.hasSpawnedTokens = function(cardGuid)
|
TokenSpawnTracker.hasSpawnedTokens = function(cardGuid)
|
||||||
return internal.getSpawnTracker().call("hasSpawnedTokens", cardGuid)
|
return getSpawnTracker().call("hasSpawnedTokens", cardGuid)
|
||||||
end
|
end
|
||||||
|
|
||||||
TokenSpawnTracker.markTokensSpawned = function(cardGuid)
|
TokenSpawnTracker.markTokensSpawned = function(cardGuid)
|
||||||
return internal.getSpawnTracker().call("markTokensSpawned", cardGuid)
|
return getSpawnTracker().call("markTokensSpawned", cardGuid)
|
||||||
end
|
end
|
||||||
|
|
||||||
TokenSpawnTracker.resetTokensSpawned = function(cardGuid)
|
TokenSpawnTracker.resetTokensSpawned = function(cardGuid)
|
||||||
return internal.getSpawnTracker().call("resetTokensSpawned", cardGuid)
|
return getSpawnTracker().call("resetTokensSpawned", cardGuid)
|
||||||
end
|
end
|
||||||
|
|
||||||
TokenSpawnTracker.resetAllAssetAndEvents = function()
|
TokenSpawnTracker.resetAllAssetAndEvents = function()
|
||||||
return internal.getSpawnTracker().call("resetAllAssetAndEvents")
|
return getSpawnTracker().call("resetAllAssetAndEvents")
|
||||||
end
|
end
|
||||||
|
|
||||||
TokenSpawnTracker.resetAllLocations = function()
|
TokenSpawnTracker.resetAllLocations = function()
|
||||||
return internal.getSpawnTracker().call("resetAllLocations")
|
return getSpawnTracker().call("resetAllLocations")
|
||||||
end
|
end
|
||||||
|
|
||||||
TokenSpawnTracker.resetAll = function()
|
TokenSpawnTracker.resetAll = function()
|
||||||
return internal.getSpawnTracker().call("resetAll")
|
return getSpawnTracker().call("resetAll")
|
||||||
end
|
end
|
||||||
|
|
||||||
return TokenSpawnTracker
|
return TokenSpawnTracker
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
do
|
do
|
||||||
local AllCardsBagApi = {}
|
local AllCardsBagApi = {}
|
||||||
local internal = {}
|
local guidHandler = getObjectsWithTag("GUIDs")[1]
|
||||||
|
|
||||||
internal.getAllCardsBag = function()
|
local function getAllCardsBag()
|
||||||
return getObjectsWithTag("AllCardsBag")[1]
|
return guidHandler.call("getObjectByOwnerAndType", { owner = "Mythos", type = "AllCardsBag" })
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Returns a specific card from the bag, based on ArkhamDB ID
|
-- Returns a specific card from the bag, based on ArkhamDB ID
|
||||||
@ -14,7 +14,7 @@ do
|
|||||||
-- cardData: TTS object data, suitable for spawning the card
|
-- cardData: TTS object data, suitable for spawning the card
|
||||||
-- cardMetadata: Table of parsed metadata
|
-- cardMetadata: Table of parsed metadata
|
||||||
AllCardsBagApi.getCardById = function(id)
|
AllCardsBagApi.getCardById = function(id)
|
||||||
internal.getAllCardsBag().call("getCardById", {id = id})
|
return getAllCardsBag().call("getCardById", {id = id})
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Gets a random basic weakness from the bag. Once a given ID has been returned
|
-- Gets a random basic weakness from the bag. Once a given ID has been returned
|
||||||
@ -23,11 +23,11 @@ do
|
|||||||
-- weaknesses.
|
-- weaknesses.
|
||||||
---@return id String ID of the selected weakness.
|
---@return id String ID of the selected weakness.
|
||||||
AllCardsBagApi.getRandomWeaknessId = function()
|
AllCardsBagApi.getRandomWeaknessId = function()
|
||||||
internal.getAllCardsBag().call("getRandomWeaknessId")
|
return getAllCardsBag().call("getRandomWeaknessId")
|
||||||
end
|
end
|
||||||
|
|
||||||
AllCardsBagApi.isIndexReady = function()
|
AllCardsBagApi.isIndexReady = function()
|
||||||
internal.getAllCardsBag().call("isIndexReady")
|
return getAllCardsBag().call("isIndexReady")
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Called by Hotfix bags when they load. If we are still loading indexes, then
|
-- Called by Hotfix bags when they load. If we are still loading indexes, then
|
||||||
@ -36,7 +36,7 @@ do
|
|||||||
-- called once indexing is complete it means the hotfix bag has been added
|
-- called once indexing is complete it means the hotfix bag has been added
|
||||||
-- later, and we should rebuild the index to integrate the hotfix bag.
|
-- later, and we should rebuild the index to integrate the hotfix bag.
|
||||||
AllCardsBagApi.rebuildIndexForHotfix = function()
|
AllCardsBagApi.rebuildIndexForHotfix = function()
|
||||||
internal.getAllCardsBag().call("rebuildIndexForHotfix")
|
return getAllCardsBag().call("rebuildIndexForHotfix")
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Searches the bag for cards which match the given name and returns a list. Note that this is
|
-- Searches the bag for cards which match the given name and returns a list. Note that this is
|
||||||
@ -44,11 +44,11 @@ do
|
|||||||
---@param name String or string fragment to search for names
|
---@param name String or string fragment to search for names
|
||||||
---@param exact Boolean Whether the name match should be exact
|
---@param exact Boolean Whether the name match should be exact
|
||||||
AllCardsBagApi.getCardsByName = function(name, exact)
|
AllCardsBagApi.getCardsByName = function(name, exact)
|
||||||
internal.getAllCardsBag().call("getCardsByName", {name = name, exact = exact})
|
return getAllCardsBag().call("getCardsByName", {name = name, exact = exact})
|
||||||
end
|
end
|
||||||
|
|
||||||
AllCardsBagApi.isBagPresent = function()
|
AllCardsBagApi.isBagPresent = function()
|
||||||
internal.getAllCardsBag() and true
|
return getAllCardsBag() and true
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Returns a list of cards from the bag matching a class and level (0 or upgraded)
|
-- Returns a list of cards from the bag matching a class and level (0 or upgraded)
|
||||||
@ -59,15 +59,15 @@ do
|
|||||||
-- cardData: TTS object data, suitable for spawning the card
|
-- cardData: TTS object data, suitable for spawning the card
|
||||||
-- cardMetadata: Table of parsed metadata
|
-- cardMetadata: Table of parsed metadata
|
||||||
AllCardsBagApi.getCardsByClassAndLevel = function(class, upgraded)
|
AllCardsBagApi.getCardsByClassAndLevel = function(class, upgraded)
|
||||||
internal.getAllCardsBag().call("getCardsByClassAndLevel", {class = class, upgraded = upgraded})
|
return getAllCardsBag().call("getCardsByClassAndLevel", {class = class, upgraded = upgraded})
|
||||||
end
|
end
|
||||||
|
|
||||||
AllCardsBagApi.getCardsByCycle = function(cycle)
|
AllCardsBagApi.getCardsByCycle = function(cycle)
|
||||||
internal.getAllCardsBag().call("getCardsByCycle", cycle)
|
return getAllCardsBag().call("getCardsByCycle", cycle)
|
||||||
end
|
end
|
||||||
|
|
||||||
AllCardsBagApi.getUniqueWeaknesses = function()
|
AllCardsBagApi.getUniqueWeaknesses = function()
|
||||||
internal.getAllCardsBag().call("getUniqueWeaknesses")
|
return getAllCardsBag().call("getUniqueWeaknesses")
|
||||||
end
|
end
|
||||||
|
|
||||||
return AllCardsBagApi
|
return AllCardsBagApi
|
||||||
|
@ -7,13 +7,12 @@ local validCountItemList = {
|
|||||||
["Clue"] = 1,
|
["Clue"] = 1,
|
||||||
[""] = 1
|
[""] = 1
|
||||||
}
|
}
|
||||||
local MATCOLOR, TRASH
|
|
||||||
exposedValue = 0
|
exposedValue = 0
|
||||||
|
|
||||||
function onLoad()
|
function onLoad()
|
||||||
self.createButton({
|
self.createButton({
|
||||||
label = "",
|
label = "",
|
||||||
click_function = "removeAllClues",
|
click_function = "countItems",
|
||||||
function_owner = self,
|
function_owner = self,
|
||||||
position = { 0, 0.1, 0 },
|
position = { 0, 0.1, 0 },
|
||||||
height = 0,
|
height = 0,
|
||||||
@ -21,9 +20,6 @@ function onLoad()
|
|||||||
font_color = { 0, 0, 0 },
|
font_color = { 0, 0, 0 },
|
||||||
font_size = 2000
|
font_size = 2000
|
||||||
})
|
})
|
||||||
-- set MATCOLOR based on memo
|
|
||||||
MATCOLOR = JSON.decode(self.getMemo()).matColor
|
|
||||||
TRASH = getObjectsWithAllTags({MATCOLOR, "Trash"})
|
|
||||||
loopID = Wait.time(countItems, 1, -1)
|
loopID = Wait.time(countItems, 1, -1)
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -69,20 +65,8 @@ function findValidItemsInSphere()
|
|||||||
return retval
|
return retval
|
||||||
end
|
end
|
||||||
|
|
||||||
function removeAllClues()
|
function removeAllClues(trash)
|
||||||
startLuaCoroutine(self, "clueRemovalCoroutine")
|
for _, obj in ipairs(findValidItemsInSphere()) do
|
||||||
end
|
trash.putObject(obj)
|
||||||
|
|
||||||
function clueRemovalCoroutine()
|
|
||||||
for _, entry in ipairs(findValidItemsInSphere()) do
|
|
||||||
-- Do not put the table in the garbage
|
|
||||||
if entry.hit_object.getGUID() ~= "4ee1f2" then
|
|
||||||
-- delay for animation purposes
|
|
||||||
for k = 1, 10 do
|
|
||||||
coroutine.yield(0)
|
|
||||||
end
|
|
||||||
TRASH.putObject(entry.hit_object)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
return 1
|
end
|
||||||
end
|
|
@ -4,6 +4,8 @@ local navigationOverlayApi = require("core/NavigationOverlayApi")
|
|||||||
local tokenChecker = require("core/token/TokenChecker")
|
local tokenChecker = require("core/token/TokenChecker")
|
||||||
local tokenManager = require("core/token/TokenManager")
|
local tokenManager = require("core/token/TokenManager")
|
||||||
|
|
||||||
|
local guidHandler = getObjectsWithTag("GUIDs")[1]
|
||||||
|
|
||||||
-- set true to enable debug logging and show Physics.cast()
|
-- set true to enable debug logging and show Physics.cast()
|
||||||
local DEBUG = false
|
local DEBUG = false
|
||||||
|
|
||||||
@ -83,7 +85,7 @@ activeInvestigatorId = "00000"
|
|||||||
|
|
||||||
-- table of type-object reference pairs of all owned objects
|
-- table of type-object reference pairs of all owned objects
|
||||||
local ownedObjects = {}
|
local ownedObjects = {}
|
||||||
local matColor = JSON.decode(self.getMemo()).matColor
|
local matColor = self.getMemo()
|
||||||
|
|
||||||
-- variable to track the status of the "Show Draw Button" option
|
-- variable to track the status of the "Show Draw Button" option
|
||||||
local isDrawButtonVisible = false
|
local isDrawButtonVisible = false
|
||||||
@ -103,7 +105,7 @@ function onLoad(saveState)
|
|||||||
self.interactable = DEBUG
|
self.interactable = DEBUG
|
||||||
|
|
||||||
-- get object references to owned objects
|
-- get object references to owned objects
|
||||||
getOwnedObjects()
|
ownedObjects = guidHandler.call("getObjectsByOwner", matColor)
|
||||||
|
|
||||||
-- button creation
|
-- button creation
|
||||||
for i = 1, 6 do
|
for i = 1, 6 do
|
||||||
@ -152,13 +154,6 @@ function onLoad(saveState)
|
|||||||
math.randomseed(os.time())
|
math.randomseed(os.time())
|
||||||
end
|
end
|
||||||
|
|
||||||
function getOwnedObjects()
|
|
||||||
local objList = getObjectsWithTag(matColor)
|
|
||||||
for _, obj in ipairs(objList) do
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
---------------------------------------------------------
|
---------------------------------------------------------
|
||||||
-- utility functions
|
-- utility functions
|
||||||
---------------------------------------------------------
|
---------------------------------------------------------
|
||||||
@ -873,7 +868,7 @@ function clickableClues(showCounter)
|
|||||||
clueCount = ownedObjects.ClueCounter.getVar("exposedValue")
|
clueCount = ownedObjects.ClueCounter.getVar("exposedValue")
|
||||||
|
|
||||||
-- remove clues
|
-- remove clues
|
||||||
ownedObjects.ClueCounter.call("removeAllClues")
|
ownedObjects.ClueCounter.call("removeAllClues", ownedObjects.Trash)
|
||||||
|
|
||||||
-- set value for clue clickers
|
-- set value for clue clickers
|
||||||
ownedObjects.ClickableClueCounter.call("updateVal", clueCount)
|
ownedObjects.ClickableClueCounter.call("updateVal", clueCount)
|
||||||
@ -900,7 +895,7 @@ end
|
|||||||
|
|
||||||
-- removes all clues (moving tokens to the trash and setting counters to 0)
|
-- removes all clues (moving tokens to the trash and setting counters to 0)
|
||||||
function removeClues()
|
function removeClues()
|
||||||
ownedObjects.ClueCounter.call("removeAllClues")
|
ownedObjects.ClueCounter.call("removeAllClues", ownedObjects.Trash)
|
||||||
ownedObjects.ClickableClueCounter.call("updateVal", 0)
|
ownedObjects.ClickableClueCounter.call("updateVal", 0)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -163,7 +163,7 @@ do
|
|||||||
---@param modifier Number If newValue is not provided, the existing value will be adjusted by this modifier
|
---@param modifier Number If newValue is not provided, the existing value will be adjusted by this modifier
|
||||||
PlaymatApi.updateCounter = function(matColor, type, newValue, modifier)
|
PlaymatApi.updateCounter = function(matColor, type, newValue, modifier)
|
||||||
for _, mat in ipairs(internal.getMatForColor(matColor)) do
|
for _, mat in ipairs(internal.getMatForColor(matColor)) do
|
||||||
mat.call("updateCounter", {type = type, newValue = newValue, modifier = modifier})
|
mat.call("updateCounter", { type = type, newValue = newValue, modifier = modifier })
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -216,10 +216,11 @@ do
|
|||||||
---@param matColor String Color of the playmat - White, Orange, Green, Red or All
|
---@param matColor String Color of the playmat - White, Orange, Green, Red or All
|
||||||
---@return array Table Single-element if only single playmat is requested
|
---@return array Table Single-element if only single playmat is requested
|
||||||
internal.getMatForColor = function(matColor)
|
internal.getMatForColor = function(matColor)
|
||||||
|
local guidHandler = getObjectsWithTag("GUIDs")[1]
|
||||||
if matColor == "All" then
|
if matColor == "All" then
|
||||||
return getObjectsWithTag("Playermat")
|
return guidHandler.call("getObjectsByType", "Playermat")
|
||||||
else
|
else
|
||||||
return {matColor = getObjectsWithAllTags({matColor, "Playermat"}) }
|
return { matColor = guidHandler.call("getObjectByOwnerAndType", { owner = matColor, type = "Playermat" }) }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user