Merge pull request #661 from argonui/dont-discard

Added tag for objects that should not be discarded during a scenario
This commit is contained in:
BootleggerFinn 2024-04-20 21:19:10 -05:00 committed by GitHub
commit a57b86ec30
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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