ah_sce_unpacked/unpacked/Custom_Model_Bag The Side Missions 2d16e1/Custom_Model_Bag Kaimonogatari 2df25a/Custom_Model_Bag Player Cards 64ad17/Custom_Model Kaimonogatari Player card token spawner 2a9a02.ttslua
2021-01-02 23:31:19 -05:00

79 lines
1.7 KiB
Plaintext

-- set true to enable debug logging
DEBUG = false
function log(message)
if DEBUG then
print(message)
end
end
--[[
Player cards with token counts and types
]]
PLAYER_CARD_DATA_JSON = [[
{
"Yumewatari (2)": {
"tokenType": "resource",
"tokenCount": 3
},
"Sodachi Oikura": {
"tokenType": "resource",
"tokenCount": 5
},
"Round Up (3)": {
"tokenType": "resource",
"tokenCount": 3
},
"Mathematical Proof (4):Associativity": {
"tokenType": "resource",
"tokenCount": 3
},
"Mathematical Proof (4):Recursion": {
"tokenType": "resource",
"tokenCount": 3
},
"Rouka Numachi (2)": {
"tokenType": "resource",
"tokenCount": 3
},
"Swiftness (3)": {
"tokenType": "resource",
"tokenCount": 3
},
"Astral Projection": {
"tokenType": "resource",
"tokenCount": 3
},
"Astral Projection (3)": {
"tokenType": "resource",
"tokenCount": 5
},
"Deceive Reality (3)": {
"tokenType": "resource",
"tokenCount": 3
},
"Strange Spraycan": {
"tokenType": "resource",
"tokenCount": 3
},
"Another World": {
"tokenType": "clue",
"tokenCount": 1
}
}
]]
PLAYER_CARD_DATA = JSON.decode(PLAYER_CARD_DATA_JSON)
function onload(save_state)
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()})
end