Merge branch 'master' into master

This commit is contained in:
wofsauge authored and GitHub committed 2022-02-13 18:03:44 +01:00
commit 9ce56d4bfa
7 files changed
+105 -51

No files matched your search

+47
View File
@@ -1357,3 +1357,50 @@ function EID:getLanguage()
end
return lang
end
-- Afterbirth+ modifiers
local collectiblesToCheck = { CollectibleType.COLLECTIBLE_VOID, }
local maxSlot = 1
-- Repentance modifiers
if REPENTANCE then
maxSlot = 3
--include the AB+ collectiblesToCheck in this table!
collectiblesToCheck = { CollectibleType.COLLECTIBLE_VOID,
CollectibleType.COLLECTIBLE_BINGE_EATER, CollectibleType.COLLECTIBLE_BOOK_OF_VIRTUES, CollectibleType.COLLECTIBLE_SPINDOWN_DICE,
CollectibleType.COLLECTIBLE_TAROT_CLOTH, CollectibleType.COLLECTIBLE_MOMS_BOX, 59, --Birthright Belial
CollectibleType.COLLECTIBLE_BLANK_CARD, CollectibleType.COLLECTIBLE_CLEAR_RUNE, CollectibleType.COLLECTIBLE_PLACEBO,
CollectibleType.COLLECTIBLE_FALSE_PHD, CollectibleType.COLLECTIBLE_ABYSS, CollectibleType.COLLECTIBLE_FLIP,
}
end
local blackRuneOwned = false
local lastCheck = 0
function EID:CheckPlayersCollectibles()
-- recheck the players' owned collectibles periodically, not every frame
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
EID.collectiblesOwned[v] = false
for i = 0, numPlayers - 1 do
if players[i]:HasCollectible(v) then
EID.collectiblesOwned[v] = i
break
end
end
end
blackRuneOwned = false
for i = 0, numPlayers - 1 do
for j = 0, maxSlot do
if players[i]:GetCard(j) == Card.RUNE_BLACK then
blackRuneOwned = i
break
end
end
end
end
end
function EID:AddToCollectiblesToCheckList(itemID)
table.insert(collectiblesToCheck, itemID)
end