From 9eb1da56b5fb14aa29e49ce111361cbe97f946eb Mon Sep 17 00:00:00 2001 From: Wofsauge Date: Sat, 15 May 2021 20:34:32 +0200 Subject: [PATCH] Added MCM options for Rep content --- eid_config.lua | 3 +++ main.lua | 14 +++++----- mod_config_menu.lua | 65 +++++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 73 insertions(+), 9 deletions(-) diff --git a/eid_config.lua b/eid_config.lua index 81005607..0ebf7054 100644 --- a/eid_config.lua +++ b/eid_config.lua @@ -129,6 +129,9 @@ EID.DefaultConfig = { -- Higher numbers can cause more lag! -- Default = 7 ["BagOfCraftingResults"] = 7, + -- Changes the number of Results shown for the additional Spindown dice description + -- Default = 3 + ["SpindownDiceResults"] = 3, -- Error message displayed when an error occurs -- Default = [Effect not defined] diff --git a/main.lua b/main.lua index 5a58d59b..68814259 100644 --- a/main.lua +++ b/main.lua @@ -7,7 +7,7 @@ local enableDebug = false require("eid_config") EID.Config = EID.DefaultConfig -EID.Config.Version = "3.1" +EID.Config.Version = "3.2" EID.isHidden = EID.Config["Hidden"] -- general variables @@ -388,15 +388,15 @@ local function handleBagOfCraftingRendering() customDescObj.Description = customDescObj.Description.."# {{Collectible"..v[2].."}} =" customDescObj.Description = customDescObj.Description..EID:tableToCraftingIconsMerged(v[1]) resultCount = resultCount + 1 - if resultCount > 9 then - if #results > 10 then - customDescObj.Description = customDescObj.Description.."#{{Blank}} ...+"..(#results-10).." more" + if resultCount > EID.Config["BagOfCraftingResults"]-1 then + if #results > EID.Config["BagOfCraftingResults"] then + customDescObj.Description = customDescObj.Description.."#{{Blank}} ...+"..(#results-EID.Config["BagOfCraftingResults"]).." more" end break end end end - if resultCount > EID.Config["BagOfCraftingResults"] then + if resultCount > EID.Config["BagOfCraftingResults"]-1 then break end end @@ -533,12 +533,12 @@ local function onRender(t) if player:HasCollectible(723) then descriptionObj.Description = descriptionObj.Description.."#{{Collectible723}} :" local refID = closest.SubType - for i = 1,3 do + for i = 1,EID.Config["SpindownDiceResults"] do local spinnedID = EID:getSpindownResult(refID) refID = spinnedID if spinnedID > 0 then descriptionObj.Description = descriptionObj.Description.."{{Collectible"..spinnedID.."}}" - if i ~=3 then + if i ~= EID.Config["SpindownDiceResults"] then descriptionObj.Description = descriptionObj.Description.." ->" end else diff --git a/mod_config_menu.lua b/mod_config_menu.lua index 773abce4..bbc1678f 100644 --- a/mod_config_menu.lua +++ b/mod_config_menu.lua @@ -69,7 +69,7 @@ if MCMLoaded then --------------------------------------------------------------------------- ---------------------------------General----------------------------------- -- Language - local displayLanguage = {"English", "English (detailed)", "French", "Portuguese", "Portugues (Brasil)", "Russian", "Spanish", "Italian", "Bulgarian (WIP)", "Polish (WIP)", "German (WIP)", "Turkish (WIP)"} + local displayLanguage = {"English", "English (detailed)", "French (AB+)", "Portuguese (AB+)", "Portugues (Brasil)", "Russian", "Spanish", "Italian (AB+)", "Bulgarian (WIP) (AB+)", "Polish (WIP) (AB+)", "German (WIP) (AB+)", "Turkish (WIP) (AB+)"} MCM.AddSetting( "EID", "General", @@ -134,6 +134,27 @@ if MCMLoaded then end } ) + -- Disable Alt Item option + MCM.AddSetting( + "EID", + "General", + { + Type = ModConfigMenu.OptionType.BOOLEAN, + CurrentSetting = function() + return EID.Config["DisableOnAltPath"] + end, + Display = function() + local onOff = "True" + if EID.Config["DisableOnAltPath"] then + onOff = "False" + end + return 'Show hidden alt-Path Item: ' .. onOff + end, + OnChange = function(currentBool) + EID.Config["DisableOnAltPath"] = currentBool + end + } + ) --------ShowUnidentifiedPillDescriptions--------- MCM.AddSetting( @@ -407,7 +428,47 @@ if MCMLoaded then end } ) - + + -- Spindown Dice results + local diceSteps = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10} + MCM.AddSetting( + "EID", + "Display", + { + Type = ModConfigMenu.OptionType.SCROLL, + CurrentSetting = function() + return AnIndexOf(diceSteps, EID.Config["SpindownDiceResults"]) - 1 + end, + Display = function() + return "Spindown Dice: $scroll" .. + AnIndexOf(diceSteps, EID.Config["SpindownDiceResults"]) - 1 .. " " .. EID.Config["SpindownDiceResults"] .. " Items" + end, + OnChange = function(currentNum) + EID.Config["SpindownDiceResults"] = diceSteps[currentNum%#diceSteps + 1] + end, + Info = {"Preview of Items resulting when using the Spindown dice X times"} + } + ) + + -- Bag of Crafting results + MCM.AddSetting( + "EID", + "Display", + { + Type = ModConfigMenu.OptionType.SCROLL, + CurrentSetting = function() + return AnIndexOf(diceSteps, EID.Config["BagOfCraftingResults"]) - 1 + end, + Display = function() + return "Crafting bag: $scroll" .. + AnIndexOf(diceSteps, EID.Config["BagOfCraftingResults"]) - 1 .. " " .. EID.Config["BagOfCraftingResults"] .. " Results" + end, + OnChange = function(currentNum) + EID.Config["BagOfCraftingResults"] = diceSteps[currentNum%#diceSteps + 1] + end, + Info = {"Preview of items currently craftable with Bag of crafting"} + } + ) --------------------------------------------------------------------------- ---------------------------------Visuals----------------------------------- -- Font Type