Merge pull request #405 from argonui/suzi-helper
Suzi Helper: moved script and added handling for empty bags
This commit is contained in:
commit
6b7a3821fa
@ -49,8 +49,8 @@
|
|||||||
"IgnoreFoW": false,
|
"IgnoreFoW": false,
|
||||||
"LayoutGroupSortIndex": 0,
|
"LayoutGroupSortIndex": 0,
|
||||||
"Locked": false,
|
"Locked": false,
|
||||||
|
"LuaScript": "require(\"accessories/Subject5U-21Helper\")",
|
||||||
"LuaScriptState": "",
|
"LuaScriptState": "",
|
||||||
"LuaScript_path": "Fan-MadeAccessories.aa8b38/Subject5U-21Helper.1335e8.ttslua",
|
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"Name": "Custom_Tile",
|
"Name": "Custom_Tile",
|
||||||
"Nickname": "Subject 5U-21 Helper",
|
"Nickname": "Subject 5U-21 Helper",
|
||||||
|
@ -34,8 +34,8 @@
|
|||||||
"IgnoreFoW": false,
|
"IgnoreFoW": false,
|
||||||
"LayoutGroupSortIndex": 0,
|
"LayoutGroupSortIndex": 0,
|
||||||
"Locked": false,
|
"Locked": false,
|
||||||
|
"LuaScript": "require(\"accessories/UnderworldMarketHelper\")",
|
||||||
"LuaScriptState": "",
|
"LuaScriptState": "",
|
||||||
"LuaScript_path": "Fan-MadeAccessories.aa8b38/UnderworldMarketHelper.3650ea.ttslua",
|
|
||||||
"MaterialIndex": -1,
|
"MaterialIndex": -1,
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"MeshIndex": -1,
|
"MeshIndex": -1,
|
||||||
|
@ -91,10 +91,14 @@ function getNotesFromCardsAndContainers()
|
|||||||
notes = JSON.decode(obj.getGMNotes()) or {}
|
notes = JSON.decode(obj.getGMNotes()) or {}
|
||||||
table.insert(notesList, notes)
|
table.insert(notesList, notes)
|
||||||
elseif obj.type == "Bag" or obj.type == "Deck" then
|
elseif obj.type == "Bag" or obj.type == "Deck" then
|
||||||
for _, deepObj in ipairs(obj.getData().ContainedObjects) do
|
-- check if there are actually objects contained and loop through them
|
||||||
if deepObj.Name == "Card" or deepObj.Name == "CardCustom" then
|
local containedObjects = obj.getData().ContainedObjects
|
||||||
notes = JSON.decode(deepObj.GMNotes) or {}
|
if containedObjects then
|
||||||
table.insert(notesList, notes)
|
for _, deepObj in ipairs(containedObjects) do
|
||||||
|
if deepObj.Name == "Card" or deepObj.Name == "CardCustom" then
|
||||||
|
notes = JSON.decode(deepObj.GMNotes) or {}
|
||||||
|
table.insert(notesList, notes)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
Loading…
Reference in New Issue
Block a user