From bc5ced7f8c51a59b9c4059b7b982cf6ba39cff0d Mon Sep 17 00:00:00 2001 From: Wofsauge Date: Wed, 26 May 2021 22:00:50 +0200 Subject: [PATCH] Added option to hide soulstone informations in shops --- eid_config.lua | 4 ++++ main.lua | 3 ++- mod_config_menu.lua | 24 +++++++++++++++++++++++- 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/eid_config.lua b/eid_config.lua index 9da8a376..fe0eef45 100644 --- a/eid_config.lua +++ b/eid_config.lua @@ -112,6 +112,9 @@ EID.UserConfig = { -- Toggle Display of Card / Rune descriptions when its a shop item -- Default = false ["DisplayCardInfoShop"] = false, + -- Toggle Display of Soulstone descriptions when its a shop item + -- Default = true + ["DisplaySoulstoneInfoShop"] = true, -- Toggle Display of Card / Rune descriptions when its not accessable with walking. AKA behind rock, blocks, spikes -- Default = false ["DisplayObstructedCardInfo"] = false, @@ -219,6 +222,7 @@ EID.DefaultConfig = { ["TransformationColor"] = "ColorEIDTransform", ["DisplayCardInfo"] = true, ["DisplayCardInfoShop"] = false, + ["DisplaySoulstoneInfoShop"] = true, ["DisplayObstructedCardInfo"] = false, ["DisplayPillInfo"] = true, ["DisplayPillInfoShop"] = true, diff --git a/main.lua b/main.lua index f56c85f9..350a2a70 100644 --- a/main.lua +++ b/main.lua @@ -687,7 +687,8 @@ local function onRender(t) -- small delay when having obstruction enabled & entering the room to prevent spoilers return end - if (closest:ToPickup():IsShopItem() and not EID.Config["DisplayCardInfoShop"]) or (not EID.Config["DisplayObstructedCardInfo"] and not EID.hasValidWalkingpath) or (REPENTANCE and game.Challenge == Challenge.CHALLENGE_CANTRIPPED) then + local hideinShop = closest:ToPickup():IsShopItem() and (((closest.SubType < 81 or closest.SubType > 97) and not EID.Config["DisplayCardInfoShop"]) or (closest.SubType >= 81 and not EID.Config["DisplaySoulstoneInfoShop"])) + if hideinShop or (not EID.Config["DisplayObstructedCardInfo"] and not EID.hasValidWalkingpath) or (REPENTANCE and game.Challenge == Challenge.CHALLENGE_CANTRIPPED) then EID:renderQuestionMark() return end diff --git a/mod_config_menu.lua b/mod_config_menu.lua index e2a11614..575ff170 100644 --- a/mod_config_menu.lua +++ b/mod_config_menu.lua @@ -517,6 +517,27 @@ if MCMLoaded then } ) + MCM.AddSetting( + "EID", + "Display", + { + Type = ModConfigMenu.OptionType.BOOLEAN, + CurrentSetting = function() + return EID.Config["DisplaySoulstoneInfoShop"] + end, + Display = function() + local onOff = "False" + if EID.Config["DisplaySoulstoneInfoShop"] then + onOff = "True" + end + return "Soulstone Infos: " .. onOff + end, + OnChange = function(currentBool) + EID.Config["DisplaySoulstoneInfoShop"] = currentBool + end + } + ) + -- Spindown Dice results local diceSteps = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10} MCM.AddSetting( @@ -623,7 +644,8 @@ if MCMLoaded then end, OnChange = function(currentNum) EID.Config["Scale"] = textScales[currentNum] - end + end, + Info = {"Change text size. CAN BE HARD TO READ IN SOME SETTINGS!"} } )