fixing replenish for resource counters

This commit is contained in:
Chr1Z93 2023-01-09 20:56:31 +01:00
parent 6becef2c79
commit 04bca4b998
3 changed files with 2 additions and 3 deletions

View File

@ -22,7 +22,7 @@
"ImageURL": "http://cloud-3.steamusercontent.com/ugc/949599153663401115/EAA6D40FC6E15204BBE551BCDED35CC8C75111BF/",
"WidthScale": 0
},
"Description": "0",
"Description": "",
"DragSelectable": true,
"GMNotes": "resourceCounter",
"GUID": "498ec0",

View File

@ -297,7 +297,6 @@ do
local tokenSource = getObjectFromGUID(TOKEN_SOURCE_GUID)
for _, tokenTemplate in ipairs(tokenSource.getData().ContainedObjects) do
local tokenName = tokenTemplate.GMNotes
tokenTemplate.GMNotes = ""
tokenTemplates[tokenName] = tokenTemplate
end
end

View File

@ -424,7 +424,7 @@ function replenishTokens(card, count, replenish)
if obj.getCustomObject().image == "http://cloud-3.steamusercontent.com/ugc/1758068501357192910/11DDDC7EF621320962FDCF3AE3211D5EDC3D1573/" then
foundTokens = foundTokens + math.abs(obj.getQuantity())
obj.destruct()
elseif obj.getName() == "Resource Counter" then
elseif obj.getGMNotes() == "resourceCounter" then
foundTokens = obj.getVar("val")
clickableResourceCounter = obj
break