use GameUpdateCount for the modifier collectible check

This commit is contained in:
Buurazu authored and GitHub committed 2022-01-26 00:42:56 -05:00
1 parent 9771a77a76
commit 5c433ad018
1 file changed
+3 -1
+3 -1
View File
@@ -282,13 +282,15 @@ if REPENTANCE then
CollectibleType.COLLECTIBLE_FALSE_PHD, CollectibleType.COLLECTIBLE_ABYSS, CollectibleType.COLLECTIBLE_FLIP,
}
local collectiblesOwned = {}
local lastCheck = 0
local function EIDConditions(descObj)
-- currently, only pickup descriptions have modifiers
if descObj.ObjType ~= 5 then return false end
-- recheck the players' owned collectibles periodically, not every frame
if game:GetFrameCount() % 10 == 0 then
if EID.GameUpdateCount >= lastCheck + 15 then
lastCheck = EID.GameUpdateCount
local numPlayers = game:GetNumPlayers()
local players = {}; for i = 0, numPlayers - 1 do players[i] = Isaac.GetPlayer(i) end
for _,v in ipairs(collectiblesToCheck) do