added additional check
This commit is contained in:
parent
6baee451da
commit
9d126215ba
@ -107,6 +107,14 @@ do
|
||||
}
|
||||
}
|
||||
|
||||
-- stateIDs for the multi-stated resource tokens
|
||||
local stateTable = {
|
||||
["Ammo"] = 2,
|
||||
["Charge"] = 3,
|
||||
["Secret"] = 4,
|
||||
["Supply"] = 5
|
||||
}
|
||||
|
||||
-- Source for tokens
|
||||
local TOKEN_SOURCE_GUID = "124381"
|
||||
|
||||
@ -223,7 +231,7 @@ do
|
||||
|
||||
-- this is used to load the correct state for additional resource tokens (e.g. "Ammo")
|
||||
local callback = nil
|
||||
if stateID ~= nil then
|
||||
if tokenType == "resource" and stateID ~= nil then
|
||||
callback = function(spawned) spawned.setState(stateID) end
|
||||
end
|
||||
|
||||
@ -335,14 +343,6 @@ do
|
||||
local uses = internal.getUses(card)
|
||||
if uses == nil then return end
|
||||
|
||||
-- get the stateID for the additional resource tokens
|
||||
local stateTable = {
|
||||
["Ammo"] = 2,
|
||||
["Charge"] = 3,
|
||||
["Secret"] = 4,
|
||||
["Supply"] = 5
|
||||
}
|
||||
|
||||
-- go through tokens to spawn
|
||||
local type, token, tokenCount
|
||||
for i, useInfo in ipairs(uses) do
|
||||
|
Loading…
Reference in New Issue
Block a user