update scriptstate
This commit is contained in:
parent
11d4820093
commit
d5ef1d93cc
@ -1 +1 @@
|
||||
{"activeInvestigatorId":"00000","isDrawButtonVisible":false,"playerColor":"White"}
|
||||
{"activeInvestigatorId":"00000","isDrawButtonVisible":false,"playerColor":"White","slotData":["any","any","any","Tarot","Hand (left)","Hand (right)","Ally","any","any","any","Accessory","Arcane","Arcane","Body"]}
|
||||
|
@ -1 +1 @@
|
||||
{"activeInvestigatorId":"00000","isDrawButtonVisible":false,"playerColor":"Orange"}
|
||||
{"activeInvestigatorId":"00000","isDrawButtonVisible":false,"playerColor":"Orange","slotData":["any","any","any","Tarot","Hand (left)","Hand (right)","Ally","any","any","any","Accessory","Arcane","Arcane","Body"]}
|
||||
|
@ -1 +1 @@
|
||||
{"activeInvestigatorId":"00000","isDrawButtonVisible":false,"playerColor":"Green"}
|
||||
{"activeInvestigatorId":"00000","isDrawButtonVisible":false,"playerColor":"Green","slotData":["any","any","any","Tarot","Hand (left)","Hand (right)","Ally","any","any","any","Accessory","Arcane","Arcane","Body"]}
|
||||
|
@ -344,7 +344,7 @@
|
||||
"LayoutGroupSortIndex": 0,
|
||||
"Locked": true,
|
||||
"LuaScript": "require(\"playermat/Playmat\")",
|
||||
"LuaScriptState": "{\"activeInvestigatorId\":\"00000\",\"isDrawButtonVisible\":false,\"playerColor\":\"Red\"}",
|
||||
"LuaScriptState_path": "Playermat4Red.0840d5.luascriptstate",
|
||||
"MeasureMovement": false,
|
||||
"Memo": "Red",
|
||||
"Name": "Custom_Tile",
|
||||
|
1
objects/Playermat4Red.0840d5.luascriptstate
Normal file
1
objects/Playermat4Red.0840d5.luascriptstate
Normal file
@ -0,0 +1 @@
|
||||
{"activeInvestigatorId":"00000","isDrawButtonVisible":false,"playerColor":"Red","slotData":["any","any","any","Tarot","Hand (left)","Hand (right)","Ally","any","any","any","Accessory","Arcane","Arcane","Body"]}
|
@ -88,21 +88,11 @@ end
|
||||
|
||||
function onLoad(savedData)
|
||||
if savedData and savedData ~= "" then
|
||||
local loadedData = JSON.decode(savedData)
|
||||
playerColor = loadedData.playerColor
|
||||
local loadedData = JSON.decode(savedData)
|
||||
playerColor = loadedData.playerColor
|
||||
activeInvestigatorId = loadedData.activeInvestigatorId
|
||||
isDrawButtonVisible = loadedData.isDrawButtonVisible
|
||||
|
||||
-- To-Do: remove this once the save state is properly populated
|
||||
if loadedData.slotData then
|
||||
slotData = loadedData.slotData
|
||||
else
|
||||
-- make a deep copy of the default table
|
||||
slotData = {}
|
||||
for _, slotName in ipairs(defaultSlotData) do
|
||||
table.insert(slotData, slotName)
|
||||
end
|
||||
end
|
||||
isDrawButtonVisible = loadedData.isDrawButtonVisible
|
||||
slotData = loadedData.slotData
|
||||
end
|
||||
|
||||
self.interactable = false
|
||||
|
Loading…
x
Reference in New Issue
Block a user