From eb07fdf8b4ae52d48370db54cf2c7279a9ae207d Mon Sep 17 00:00:00 2001 From: Buurazu Date: Fri, 12 Nov 2021 11:37:59 -0500 Subject: [PATCH 1/3] fix hide key issues and Tainted Lost achievement warning issue --- main.lua | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/main.lua b/main.lua index 0dde8d69..d433f8c3 100644 --- a/main.lua +++ b/main.lua @@ -568,15 +568,19 @@ EID:AddCallback(ModCallbacks.MC_POST_UPDATE, EID.onGameUpdate) local hasShownAchievementWarning = false local function renderAchievementInfo() if REPENTANCE and not EID.Config.DisableAchievementCheck and game:GetFrameCount() < 10*30 and game.Challenge == 0 then - local hasBookOfRevelationsUnlocked = EID:isCollectibleUnlockedAnyPool(CollectibleType.COLLECTIBLE_BOOK_OF_REVELATIONS or CollectibleType.COLLECTIBLE_BOOK_REVELATIONS) - if not hasBookOfRevelationsUnlocked then - local hasCubeOfMeatUnlocked = EID:isCollectibleUnlockedAnyPool(CollectibleType.COLLECTIBLE_CUBE_OF_MEAT) - if not hasCubeOfMeatUnlocked then - local demoDescObj = EID:getDescriptionObj(-999, -1, 1) - demoDescObj.Name = EID:getDescriptionEntry("AchievementWarningTitle") or "" - demoDescObj.Description = EID:getDescriptionEntry("AchievementWarningText") or "" - EID:displayPermanentText(demoDescObj) - hasShownAchievementWarning = true + local characterID = Game():GetPlayer(0):GetPlayerType() + --ID 21 = Tainted Isaac. Tainted characters have definitely beaten Mom! (Fixes Tainted Lost's item pools ruining this check) + if (characterID < 21) then + local hasBookOfRevelationsUnlocked = EID:isCollectibleUnlockedAnyPool(CollectibleType.COLLECTIBLE_BOOK_OF_REVELATIONS or CollectibleType.COLLECTIBLE_BOOK_REVELATIONS) + if not hasBookOfRevelationsUnlocked then + local hasCubeOfMeatUnlocked = EID:isCollectibleUnlockedAnyPool(CollectibleType.COLLECTIBLE_CUBE_OF_MEAT) + if not hasCubeOfMeatUnlocked then + local demoDescObj = EID:getDescriptionObj(-999, -1, 1) + demoDescObj.Name = EID:getDescriptionEntry("AchievementWarningTitle") or "" + demoDescObj.Description = EID:getDescriptionEntry("AchievementWarningText") or "" + EID:displayPermanentText(demoDescObj) + hasShownAchievementWarning = true + end end end elseif hasShownAchievementWarning then @@ -593,7 +597,10 @@ local function onRender(t) EID.isDisplaying = false EID:setPlayer() - if Input.IsButtonTriggered(EID.Config["HideKey"], EID.player.ControllerIndex or 0) or Input.IsButtonTriggered(EID.Config["HideKey"], 0) then + --Controller hide keys are 0 through 26, keyboard hide keys are 32+ + local hidekeyType = 0 + if EID.Config["HideKey"] < 32 then hidekeyType = EID.player.ControllerIndex end + if Input.IsButtonTriggered(EID.Config["HideKey"], hidekeyType) then EID.isHidden = not EID.isHidden end if ModConfigMenu and ModConfigMenu.IsVisible and ModConfigMenu.Config["Mod Config Menu"].HideHudInMenu and EID.MCMCompat_isDisplayingEIDTab ~= "Visuals" then --if if the mod config menu exists, is opened and Hide Hud is enabled, and ModConfigMenu is currently in the "Visuals" tab of EID @@ -601,8 +608,7 @@ local function onRender(t) end EID:renderMCMDummyDescription() - -- Disabling Achievement detection for now, since it breaks on some occasions since new patch - --renderAchievementInfo() + renderAchievementInfo() if EID.GameVersion == "ab+" then if EID.player:HasCollectible(CollectibleType.COLLECTIBLE_SCHOOLBAG) then From 1690e1b918bc69b7ac3e9c2ebbc230feac954b0e Mon Sep 17 00:00:00 2001 From: Buurazu Date: Fri, 12 Nov 2021 11:38:25 -0500 Subject: [PATCH 2/3] fix achievement warning being en_us --- descriptions/rep/ru.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/descriptions/rep/ru.lua b/descriptions/rep/ru.lua index 8fc17802..31175d11 100644 --- a/descriptions/rep/ru.lua +++ b/descriptions/rep/ru.lua @@ -681,5 +681,5 @@ EID.descriptions["ru"].CraftingRoomContent = "Комната:" EID.descriptions["ru"].CraftingFloorContent = "Этаж:" EID.descriptions["ru"].CraftingResults = "Результаты:#(Листать: {{CONFIG_BoC_Toggle}} + {{ButtonY}} {{ButtonA}})" EID.descriptions["ru"].CraftingBagModError = "!!! {{ColorRed}}ОШИБКА:#{{ColorRed}}Эта функция на данный момент не поддерживается с установленными модами" -EID.descriptions["en_us"].AchievementWarningTitle = "{{ColorYellow}}!!! ВНИМАНИЕ !!!" -EID.descriptions["en_us"].AchievementWarningText = "Достижения отключены!#Чтобы включить прогресс и достижения, вам сначала нужно убить Маму (Глубины II) без включенных модов" +EID.descriptions["ru"].AchievementWarningTitle = "{{ColorYellow}}!!! ВНИМАНИЕ !!!" +EID.descriptions["ru"].AchievementWarningText = "Достижения отключены!#Чтобы включить прогресс и достижения, вам сначала нужно убить Маму (Глубины II) без включенных модов" From 47ecc50b8b9e2143fc01092c58ee808b60f9cb8a Mon Sep 17 00:00:00 2001 From: Buurazu Date: Fri, 12 Nov 2021 11:41:45 -0500 Subject: [PATCH 3/3] make the achievement text less scary --- descriptions/rep/en_us.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/descriptions/rep/en_us.lua b/descriptions/rep/en_us.lua index 9a5a1491..dd714af6 100644 --- a/descriptions/rep/en_us.lua +++ b/descriptions/rep/en_us.lua @@ -690,4 +690,4 @@ EID.descriptions["en_us"].CraftingFloorContent = "Floor:" EID.descriptions["en_us"].CraftingResults = "(Scroll: hold {{CONFIG_BoC_Toggle}} + {{ButtonY}} {{ButtonA}},#Lock: {{ButtonX}}, Refresh: {{ButtonB}})" EID.descriptions["en_us"].CraftingBagModError = "!!! {{ColorRed}}ERROR:#{{ColorRed}}The \"Crafting result calculation\" feature currently does not work when item mods are installed!#{{ColorRed}}Please uninstall the item mods or deactivate the Bag of Crafting descriptions in the config" EID.descriptions["en_us"].AchievementWarningTitle = "{{ColorYellow}}!!! WARNING !!!" -EID.descriptions["en_us"].AchievementWarningText = "Achievements are disabled!#In order to enable progression and achievements, you first need to kill Mom (Depths II) without any mods enabled." +EID.descriptions["en_us"].AchievementWarningText = "Achievements are disabled!#In order to enable progression and achievements, you first need to kill Mom (Depths II) without any mods enabled.#(If you've defeated Mom, this message is a bug and can be ignored)"