Improve Void absorbtion tracking
This commit is contained in:
1 parent
3d24356f8e
commit
407649a33f
1 file changed
+11
-13
@@ -363,21 +363,19 @@ if REPENTANCE then
|
||||
end
|
||||
end
|
||||
EID:AddCallback(ModCallbacks.MC_PRE_USE_ITEM, EID.CheckFlipGridIndexes, CollectibleType.COLLECTIBLE_FLIP)
|
||||
|
||||
-- Watch for a Void absorbing active items
|
||||
-- (Note: Doesn't differentiate between different players if both players have Void...)
|
||||
-- (Note: Doesn't care about shop / choice items yet either)
|
||||
function EID:CheckVoidAbsorbs(collectibleType)
|
||||
local pedestals = Isaac.FindByType(5, 100, -1, true, false)
|
||||
for _, pedestal in ipairs(pedestals) do
|
||||
if pedestal.SubType > 0 and EID.itemConfig:GetCollectible(pedestal.SubType).Type == 3 then
|
||||
EID.absorbedItems[pedestal.SubType] = true
|
||||
end
|
||||
end
|
||||
end
|
||||
EID:AddCallback(ModCallbacks.MC_PRE_USE_ITEM, EID.CheckVoidAbsorbs, CollectibleType.COLLECTIBLE_VOID)
|
||||
end
|
||||
|
||||
-- Watch for a Void absorbing active items
|
||||
function EID:CheckVoidAbsorbs(collectibleType, rng, player)
|
||||
local playerID = EID:getPlayerID(player)
|
||||
EID.absorbedItems[tostring(playerID)] = EID.absorbedItems[tostring(playerID)] or {}
|
||||
for _,v in ipairs(EID:VoidRoomCheck()) do
|
||||
EID.absorbedItems[tostring(playerID)][tostring(v)] = true
|
||||
end
|
||||
EID.RecheckVoid = true
|
||||
end
|
||||
EID:AddCallback(ModCallbacks.MC_PRE_USE_ITEM, EID.CheckVoidAbsorbs, CollectibleType.COLLECTIBLE_VOID)
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
--------------------------Handle Scale Shortcut----------------------------
|
||||
|
||||
|
||||
Reference in new issue
Block a user