use GameUpdateCount for the modifier collectible check
This commit is contained in:
1 parent
9771a77a76
commit
5c433ad018
1 file changed
+4
-2
+4
-2
@@ -282,13 +282,15 @@ if REPENTANCE then
|
|||||||
CollectibleType.COLLECTIBLE_FALSE_PHD, CollectibleType.COLLECTIBLE_ABYSS, CollectibleType.COLLECTIBLE_FLIP,
|
CollectibleType.COLLECTIBLE_FALSE_PHD, CollectibleType.COLLECTIBLE_ABYSS, CollectibleType.COLLECTIBLE_FLIP,
|
||||||
}
|
}
|
||||||
local collectiblesOwned = {}
|
local collectiblesOwned = {}
|
||||||
|
local lastCheck = 0
|
||||||
|
|
||||||
local function EIDConditions(descObj)
|
local function EIDConditions(descObj)
|
||||||
-- currently, only pickup descriptions have modifiers
|
-- currently, only pickup descriptions have modifiers
|
||||||
if descObj.ObjType ~= 5 then return false end
|
if descObj.ObjType ~= 5 then return false end
|
||||||
|
|
||||||
-- recheck the players' owned collectibles periodically, not every frame
|
-- 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 numPlayers = game:GetNumPlayers()
|
||||||
local players = {}; for i = 0, numPlayers - 1 do players[i] = Isaac.GetPlayer(i) end
|
local players = {}; for i = 0, numPlayers - 1 do players[i] = Isaac.GetPlayer(i) end
|
||||||
for _,v in ipairs(collectiblesToCheck) do
|
for _,v in ipairs(collectiblesToCheck) do
|
||||||
|
|||||||
Reference in new issue
Block a user