From 3c3b1e8184578c31c8419de39069b6d855b1a6d9 Mon Sep 17 00:00:00 2001 From: Buurazu Date: Sun, 13 Feb 2022 13:50:58 -0500 Subject: [PATCH 1/4] Update eid_modifiers.lua --- eid_modifiers.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eid_modifiers.lua b/eid_modifiers.lua index cdc69bf9..2b9cc703 100644 --- a/eid_modifiers.lua +++ b/eid_modifiers.lua @@ -191,7 +191,7 @@ if REPENTANCE then -- Handle Spindown Dice description addition local function SpindownDiceCallback(descObj) -- get the ID of the player that owns the Spindown Dice - local playerID = (EID.collectiblesOwned[723] or (EID.absorbedItems[723] and EID.collectiblesOwned[477])) + local playerID = (EID.collectiblesOwned[723] or EID.collectiblesAbsorbed[723]) EID:appendToDescription(descObj, "#{{Collectible723}} :") local refID = descObj.ObjSubType local hasCarBattery = Isaac.GetPlayer(playerID):HasCollectible(CollectibleType.COLLECTIBLE_CAR_BATTERY) @@ -444,10 +444,10 @@ if REPENTANCE then if EID.collectiblesOwned[664] then table.insert(callbacks, BingeEaterCallback) end if EID.collectiblesOwned[59] then table.insert(callbacks, BookOfBelialCallback) end if EID.collectiblesOwned[584] then table.insert(callbacks, BookOfVirtuesCallback) end - if EID.collectiblesOwned[706] or (EID.absorbedItems[706] and EID.collectiblesOwned[477]) then table.insert(callbacks, AbyssCallback) end + if EID.collectiblesOwned[706] or EID.collectiblesAbsorbed[706] then table.insert(callbacks, AbyssCallback) end if EID.collectiblesOwned[711] and EID:getEntityData(descObj.Entity, "EID_FlipItemID") then table.insert(callbacks, FlipCallback) end - if EID.Config["SpindownDiceResults"] > 0 and (EID.collectiblesOwned[723] or (EID.absorbedItems[723] and EID.collectiblesOwned[477])) and descObj.ObjSubType ~= 668 then table.insert(callbacks, SpindownDiceCallback) end + if EID.Config["SpindownDiceResults"] > 0 and (EID.collectiblesOwned[723] or EID.collectiblesAbsorbed[723]) and descObj.ObjSubType ~= 668 then table.insert(callbacks, SpindownDiceCallback) end -- Card / Rune Callbacks elseif descObj.ObjVariant == PickupVariant.PICKUP_TAROTCARD then From 7c9865e126fafa0c3cf3f40b24b26fad51bcb1cc Mon Sep 17 00:00:00 2001 From: Buurazu Date: Sun, 13 Feb 2022 13:51:54 -0500 Subject: [PATCH 2/4] Update eid_api.lua --- eid_api.lua | 45 +-------------------------------------------- 1 file changed, 1 insertion(+), 44 deletions(-) diff --git a/eid_api.lua b/eid_api.lua index 0b17b4c7..b5b5a7ec 100644 --- a/eid_api.lua +++ b/eid_api.lua @@ -1358,49 +1358,6 @@ function EID:getLanguage() 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 \ No newline at end of file +end From 235d3ca5f1a549e545b2b7949d934151fc17f0c0 Mon Sep 17 00:00:00 2001 From: Buurazu Date: Sun, 13 Feb 2022 13:52:23 -0500 Subject: [PATCH 3/4] Update main.lua --- main.lua | 5 ----- 1 file changed, 5 deletions(-) diff --git a/main.lua b/main.lua index 9f6d490f..319148ef 100644 --- a/main.lua +++ b/main.lua @@ -28,7 +28,6 @@ EID.sacrificeCounter = {} EID.itemConfig = Isaac.GetItemConfig() EID.itemUnlockStates = {} EID.CraneItemType = {} -EID.collectiblesOwned = {} EID.absorbedItems = {} EID.CollectedItems = {} local pathsChecked = {} @@ -1257,7 +1256,6 @@ if EID.MCMLoaded or REPENTANCE then ["BagFloorContent"] = true, ["CraneItemType"] = true, ["FlipItemPositions"] = true, - ["CollectiblesOwned"] = true, ["AbsorbedItems"] = true, ["CollectedItems"] = true, } @@ -1282,14 +1280,12 @@ if EID.MCMLoaded or REPENTANCE then EID.BagItems = {} EID.CraneItemType = {} EID.flipItemPositions = {} - EID.collectiblesOwned = {} EID.absorbedItems = {} if isSave then EID.BagItems = savedEIDConfig["BagContent"] or {} EID.bagOfCraftingRoomQueries = savedEIDConfig["BagFloorContent"] or {} EID.CraneItemType = savedEIDConfig["CraneItemType"] or {} - EID.collectiblesOwned = savedEIDConfig["AbsorbedItems"] or {} EID.absorbedItems = savedEIDConfig["AbsorbedItems"] or {} -- turn list back into dict because json cant save dict indices. @@ -1351,7 +1347,6 @@ if EID.MCMLoaded or REPENTANCE then EID.Config["BagContent"] = EID.BagItems or {} EID.Config["BagFloorContent"] = EID.bagOfCraftingRoomQueries or {} EID.Config["CraneItemType"] = EID.CraneItemType or {} - EID.Config["CollectiblesOwned"] = EID.collectiblesOwned or {} EID.Config["AbsorbedItems"] = EID.absorbedItems or {} -- turn dictionary into list because json cant save dict indices. From 7c47f2c7cca69bce657720568fefe377a9d3c099 Mon Sep 17 00:00:00 2001 From: Buurazu Date: Sun, 13 Feb 2022 13:53:50 -0500 Subject: [PATCH 4/4] Update eid_api.lua --- eid_api.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eid_api.lua b/eid_api.lua index b5b5a7ec..5b26e58f 100644 --- a/eid_api.lua +++ b/eid_api.lua @@ -1359,5 +1359,5 @@ function EID:getLanguage() end function EID:AddToCollectiblesToCheckList(itemID) - table.insert(collectiblesToCheck, itemID) + table.insert(EID.collectiblesToCheck, itemID) end