From e053a288d1d0c7d16188741e658721c1f3f10f1a Mon Sep 17 00:00:00 2001 From: Buurazu Date: Tue, 26 Apr 2022 22:23:57 -0400 Subject: [PATCH 1/2] Check player's starting actives after genesis usage --- main.lua | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/main.lua b/main.lua index 0001d117..ec577ce4 100644 --- a/main.lua +++ b/main.lua @@ -1463,6 +1463,13 @@ end EID:AddCallback(ModCallbacks.MC_POST_RENDER, onRender) +-- Check the active items of every player for transformation progress (used at game start and after Genesis) +local function CheckAllActiveItemProgress() + for i = 0, game:GetNumPlayers() - 1 do + AddActiveItemProgress(Isaac.GetPlayer(i)) + end +end + local function AddActiveItemProgress(player, isD4) EID.ForceRefreshCache = true local playerID = EID:getPlayerID(player) @@ -1505,6 +1512,7 @@ EID:AddCallback(ModCallbacks.MC_USE_ITEM, OnUseD4, CollectibleType.COLLECTIBLE_D -- Re-init transformation progress and item interactions after using Genesis local function OnUseGenesis(_, _, _, player) OnGameStartGeneral() + CheckAllActiveItemProgress() end EID:AddCallback(ModCallbacks.MC_USE_ITEM, OnUseGenesis, CollectibleType.COLLECTIBLE_GENESIS) @@ -1563,10 +1571,8 @@ if EID.MCMLoaded or REPENTANCE then EID.PlayerItemInteractions[tonumber(playerID)] = convertedData end else - -- check for the players' starting active items (thorough, for Eden and modded J&E chars' sake) - for i = 0, game:GetNumPlayers() - 1 do - AddActiveItemProgress(Isaac.GetPlayer(i)) - end + -- check for the players' starting active items + CheckAllActiveItemProgress() end if REPENTANCE then From dc078000ab761d0da862eb6337ddb8f638fe95b7 Mon Sep 17 00:00:00 2001 From: Buurazu Date: Tue, 26 Apr 2022 22:34:23 -0400 Subject: [PATCH 2/2] don't genesis in ab+! --- main.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/main.lua b/main.lua index ec577ce4..100b4f24 100644 --- a/main.lua +++ b/main.lua @@ -1510,11 +1510,13 @@ end EID:AddCallback(ModCallbacks.MC_USE_ITEM, OnUseD4, CollectibleType.COLLECTIBLE_D4) -- Re-init transformation progress and item interactions after using Genesis -local function OnUseGenesis(_, _, _, player) - OnGameStartGeneral() - CheckAllActiveItemProgress() +if REPENTANCE then + local function OnUseGenesis(_, _, _, player) + OnGameStartGeneral() + CheckAllActiveItemProgress() + end + EID:AddCallback(ModCallbacks.MC_USE_ITEM, OnUseGenesis, CollectibleType.COLLECTIBLE_GENESIS) end -EID:AddCallback(ModCallbacks.MC_USE_ITEM, OnUseGenesis, CollectibleType.COLLECTIBLE_GENESIS) function EID:OnUsePill(pillEffectID, player) local playerID = EID:getPlayerID(player)