Updated doom counter reset to remove ignored doom
This commit is contained in:
parent
0958f6fa7e
commit
71838e3b10
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user