Return absorbable actives, add getPlayerID
This commit is contained in:
1 parent
5d73a07bbf
commit
3d24356f8e
1 file changed
+20
-1
+20
-1
@@ -1003,10 +1003,12 @@ local function GetTwoIncreases(rng, tbl)
|
|||||||
return rng
|
return rng
|
||||||
end
|
end
|
||||||
-- Count the number of absorbable pedestals in the room
|
-- Count the number of absorbable pedestals in the room
|
||||||
|
-- Returns a table of active items that will be absorbed
|
||||||
function EID:VoidRoomCheck()
|
function EID:VoidRoomCheck()
|
||||||
numVoidable = 0
|
numVoidable = 0
|
||||||
numRunable = 0
|
numRunable = 0
|
||||||
EID.VoidOptionIndexes = {}
|
EID.VoidOptionIndexes = {}
|
||||||
|
local activesAbsorbed = {}
|
||||||
for _, entity in ipairs(Isaac.FindByType(5, 100, -1, true, false)) do
|
for _, entity in ipairs(Isaac.FindByType(5, 100, -1, true, false)) do
|
||||||
local pickup = entity:ToPickup()
|
local pickup = entity:ToPickup()
|
||||||
-- Count this pedestal if it's not an active (or this is Black Rune), not a shop item, and (in Repentance) the first of its option index
|
-- Count this pedestal if it's not an active (or this is Black Rune), not a shop item, and (in Repentance) the first of its option index
|
||||||
@@ -1015,9 +1017,14 @@ function EID:VoidRoomCheck()
|
|||||||
(not REPENTANCE or pickup.OptionsPickupIndex == 0 or EID.VoidOptionIndexes[pickup.OptionsPickupIndex] == nil) then
|
(not REPENTANCE or pickup.OptionsPickupIndex == 0 or EID.VoidOptionIndexes[pickup.OptionsPickupIndex] == nil) then
|
||||||
numRunable = numRunable + 1
|
numRunable = numRunable + 1
|
||||||
if REPENTANCE then EID.VoidOptionIndexes[pickup.OptionsPickupIndex] = entity.SubType end
|
if REPENTANCE then EID.VoidOptionIndexes[pickup.OptionsPickupIndex] = entity.SubType end
|
||||||
if (EID.itemConfig:GetCollectible(entity.SubType).Type ~= ItemType.ITEM_ACTIVE) then numVoidable = numVoidable + 1 end
|
if (EID.itemConfig:GetCollectible(entity.SubType).Type ~= ItemType.ITEM_ACTIVE) then
|
||||||
|
numVoidable = numVoidable + 1
|
||||||
|
else
|
||||||
|
table.insert(activesAbsorbed, entity.SubType)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
return activesAbsorbed
|
||||||
end
|
end
|
||||||
-- Determine what stats will be increased after 1 absorption, the whole room's absorption, and whole room + a purchased item above your head
|
-- Determine what stats will be increased after 1 absorption, the whole room's absorption, and whole room + a purchased item above your head
|
||||||
function EID:VoidRNGCheck(player, isRune)
|
function EID:VoidRNGCheck(player, isRune)
|
||||||
@@ -1332,6 +1339,18 @@ function EID:checkPlayersForMissingItems()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function EID:getPlayerID(entityPlayer)
|
||||||
|
if not entityPlayer then return 0 end
|
||||||
|
for i = 0, game:GetNumPlayers() - 1 do
|
||||||
|
local player = Isaac.GetPlayer(i)
|
||||||
|
if GetPtrHash(player) == GetPtrHash(entityPlayer) then
|
||||||
|
print(i)
|
||||||
|
return i
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
|
||||||
function EID:getLanguage()
|
function EID:getLanguage()
|
||||||
local lang = EID.Config["Language"]
|
local lang = EID.Config["Language"]
|
||||||
if lang == "auto" then
|
if lang == "auto" then
|
||||||
|
|||||||
Reference in new issue
Block a user