Updated doom counter reset to remove ignored doom

This commit is contained in:
Chr1Z93 2024-11-01 23:35:45 +01:00
parent 0958f6fa7e
commit 71838e3b10

View File

@ -84,9 +84,9 @@ function getDoomCount()
end
-- gets quantity (for stacks) of doom
function getDoomAmount(obj)
function getDoomAmount(obj, disregardIgnoreTag)
if (obj.is_face_down and obj.getCustomObject().image_bottom == doomURL)
and not obj.hasTag(IGNORE_TAG)
and (not obj.hasTag(IGNORE_TAG) or disregardIgnoreTag)
and inArea(obj.getPosition(), TOTAL_PLAY_AREA) then
return math.abs(obj.getQuantity())
else
@ -115,7 +115,7 @@ end
function removeDoomFromList(objList)
local count = 0
for _, obj in ipairs(objList) do
local amount = getDoomAmount(obj)
local amount = getDoomAmount(obj, true)
if amount > 0 then
TRASH.putObject(obj)
count = count + amount