ah_sce_unpacked/unpacked/Custom_Model_Bag Future Reflections 0f0680/Custom_Model Custom Data Helper 26c67a.ttslua

76 lines
2.3 KiB
Plaintext
Raw Normal View History

2021-03-23 10:59:55 -04:00
-- set true to enable debug logging
DEBUG = false
function log(message)
if DEBUG then
print(message)
end
end
--[[
Known locations and clues. We check this to determine if we should
atttempt to spawn clues, first we look for <LOCATION_NAME>_<GUID> and if
we find nothing we look for <LOCATION_NAME>
format is [location_guid -> clueCount]
]]
LOCATIONS_DATA_JSON = [[
{
2021-04-25 09:57:58 -04:00
"Grand Hall": {"type": "perPlayer", "value": 1, "clueSide": "front"},
"Second Story Balcony": {"type": "perPlayer", "value": 2, "clueSide": "front"},
"Dark Room": {"type": "fixed", "value": 2, "clueSide": "back"},
"The Red Door": {"type": "perPlayer", "value": 3, "clueSide": "front"},
"Engine Room": {"type": "fixed", "value": 4, "clueSide": "front"},
"Control Room": {"type": "fixed", "value": 3, "clueSide": "front"},
"Genetics Archive": {"type": "perPlayer", "value": 1, "clueSide": "front"},
"Operation Theater": {"type": "perPlayer", "value": 1, "clueSide": "front"},
"Weapon Development": {"type": "perPlayer", "value": 2, "clueSide": "front"},
"Body Disposal": {"type": "perPlayer", "value": 2, "clueSide": "front"}
2021-03-23 10:59:55 -04:00
}
]]
PLAYER_CARD_DATA_JSON = [[
2021-04-25 09:57:58 -04:00
{
"Arthur Lambert (Stalwart Companion)": {
2021-03-23 10:59:55 -04:00
"tokenType": "resource",
"tokenCount": 3
},
2021-04-25 09:57:58 -04:00
"Tool Belt (3)": {
2021-03-23 10:59:55 -04:00
"tokenType": "resource",
2021-04-25 09:57:58 -04:00
"tokenCount": 4
2021-03-23 10:59:55 -04:00
},
2021-04-25 09:57:58 -04:00
"Yithian Rifle": {
2021-03-23 10:59:55 -04:00
"tokenType": "resource",
2021-04-10 00:44:08 -04:00
"tokenCount": 3
},
2021-03-23 10:59:55 -04:00
"xxx": {
"tokenType": "resource",
"tokenCount": 3
}
}
]]
HIDDEN_CARD_DATA = {
"Unpleasant Card (Doom)",
"Unpleasant Card (Gloom)",
"The Case of the Scarlet DOOOOOM!"
}
LOCATIONS_DATA = JSON.decode(LOCATIONS_DATA_JSON)
PLAYER_CARD_DATA = JSON.decode(PLAYER_CARD_DATA_JSON)
function onload(save_state)
local playArea = getObjectFromGUID('721ba2')
playArea.call("updateLocations", {self.getGUID()})
local playerMatWhite = getObjectFromGUID('8b081b')
playerMatWhite.call("updatePlayerCards", {self.getGUID()})
local playerMatOrange = getObjectFromGUID('bd0ff4')
playerMatOrange.call("updatePlayerCards", {self.getGUID()})
local playerMatGreen = getObjectFromGUID('383d8b')
playerMatGreen.call("updatePlayerCards", {self.getGUID()})
local playerMatRed = getObjectFromGUID('0840d5')
playerMatRed.call("updatePlayerCards", {self.getGUID()})
local dataHelper = getObjectFromGUID('708279')
dataHelper.call("updateHiddenCards", {self.getGUID()})
end