introduce new tag for objects that should not be discarded during a scenario (e.g. key tokens)

This commit is contained in:
Chr1Z93 2024-04-19 10:24:05 +02:00
parent f60509218f
commit 4ca3cb977b

View File

@ -214,8 +214,8 @@ function discardListOfObjects(objList)
-- put chaos tokens back into bag (e.g. Unrelenting)
elseif tokenChecker.isChaosToken(obj) then
chaosBagApi.returnChaosTokenToBag(obj)
-- don't touch locked objects (like the table etc.)
elseif not obj.getLock() then
-- don't touch locked objects (like the table etc.) or specific objects (like key tokens)
elseif not obj.getLock() and not obj.hasTag("DontDiscard") then
ownedObjects.Trash.putObject(obj)
end
end