Improve Void absorbtion tracking

This commit is contained in:
Buurazu authored and GitHub committed 2022-02-13 05:11:42 -05:00
1 parent 3d24356f8e
commit 407649a33f
1 file changed
+7 -9
+7 -9
View File
@@ -363,20 +363,18 @@ if REPENTANCE then
end end
end end
EID:AddCallback(ModCallbacks.MC_PRE_USE_ITEM, EID.CheckFlipGridIndexes, CollectibleType.COLLECTIBLE_FLIP) EID:AddCallback(ModCallbacks.MC_PRE_USE_ITEM, EID.CheckFlipGridIndexes, CollectibleType.COLLECTIBLE_FLIP)
end
-- Watch for a Void absorbing active items -- Watch for a Void absorbing active items
-- (Note: Doesn't differentiate between different players if both players have Void...) function EID:CheckVoidAbsorbs(collectibleType, rng, player)
-- (Note: Doesn't care about shop / choice items yet either) local playerID = EID:getPlayerID(player)
function EID:CheckVoidAbsorbs(collectibleType) EID.absorbedItems[tostring(playerID)] = EID.absorbedItems[tostring(playerID)] or {}
local pedestals = Isaac.FindByType(5, 100, -1, true, false) for _,v in ipairs(EID:VoidRoomCheck()) do
for _, pedestal in ipairs(pedestals) do EID.absorbedItems[tostring(playerID)][tostring(v)] = true
if pedestal.SubType > 0 and EID.itemConfig:GetCollectible(pedestal.SubType).Type == 3 then
EID.absorbedItems[pedestal.SubType] = true
end
end end
EID.RecheckVoid = true
end end
EID:AddCallback(ModCallbacks.MC_PRE_USE_ITEM, EID.CheckVoidAbsorbs, CollectibleType.COLLECTIBLE_VOID) EID:AddCallback(ModCallbacks.MC_PRE_USE_ITEM, EID.CheckVoidAbsorbs, CollectibleType.COLLECTIBLE_VOID)
end
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
--------------------------Handle Scale Shortcut---------------------------- --------------------------Handle Scale Shortcut----------------------------