From 5c433ad0183c376cc2f853a58c9736291b10e1a0 Mon Sep 17 00:00:00 2001 From: Buurazu Date: Wed, 26 Jan 2022 00:42:56 -0500 Subject: [PATCH] use GameUpdateCount for the modifier collectible check --- eid_modifiers.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/eid_modifiers.lua b/eid_modifiers.lua index 2fff2c88..429215d4 100644 --- a/eid_modifiers.lua +++ b/eid_modifiers.lua @@ -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