MCM rewrite + bug fixes
This commit is contained in:
1 parent
7f91bbcd52
commit
f6782e6c99
1 file changed
+105
-461
+105
-461
@@ -168,6 +168,30 @@ function EID:AddNumberSetting(category, optionName, displayText, minimum, maximu
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function EID:AddScrollSetting(category, optionName, displayText, scrollTable, params)
|
||||||
|
if type(params) ~= "table" then params = {} end
|
||||||
|
if params.repOnly and not REPENTANCE then return end
|
||||||
|
MCM.AddSetting(
|
||||||
|
"EID", category,
|
||||||
|
{
|
||||||
|
Type = ModConfigMenu.OptionType.SCROLL,
|
||||||
|
CurrentSetting = params.currentSettingFunc or function()
|
||||||
|
return AnIndexOf(scrollTable, EID.Config[optionName]) - 1
|
||||||
|
end,
|
||||||
|
Display = params.displayFunc or function()
|
||||||
|
if params.displayingTab then EID.MCMCompat_isDisplayingEIDTab = params.displayingTab end
|
||||||
|
return displayText .. ": $scroll" .. (AnIndexOf(scrollTable, EID.Config[optionName]) - 1) .. " " ..
|
||||||
|
EID.Config[optionName] .. (params.label or "")
|
||||||
|
end,
|
||||||
|
OnChange = params.onChangeFunc or function(currentNum)
|
||||||
|
EID.Config[optionName] = scrollTable[currentNum + 1]
|
||||||
|
EID.MCM_OptionChanged = true
|
||||||
|
end,
|
||||||
|
Info = params.infoText or {}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
function EID:AddHotkeySetting(category, optionName, displayText, infoText, isController)
|
function EID:AddHotkeySetting(category, optionName, displayText, infoText, isController)
|
||||||
if (type(infoText) == "string") then infoText = {infoText} end
|
if (type(infoText) == "string") then infoText = {infoText} end
|
||||||
@@ -238,6 +262,7 @@ if MCMLoaded then
|
|||||||
MCM.AddText("EID", "Info", function() return EID.isHidden and"~~~~~~~~~~~~~~~~~~~~~~~~~~~" or "" end)
|
MCM.AddText("EID", "Info", function() return EID.isHidden and"~~~~~~~~~~~~~~~~~~~~~~~~~~~" or "" end)
|
||||||
MCM.AddText("EID", "Info", function() return EID.isHidden and"~~~~~ CURRENTLY HIDDEN! ~~~~~" or "" end)
|
MCM.AddText("EID", "Info", function() return EID.isHidden and"~~~~~ CURRENTLY HIDDEN! ~~~~~" or "" end)
|
||||||
MCM.AddText("EID", "Info", function()
|
MCM.AddText("EID", "Info", function()
|
||||||
|
EID.MCMCompat_isDisplayingEIDTab = ""
|
||||||
if EID.Config["HideKey"] ~= -1 or EID.Config["HideButton"] ~= -1 then
|
if EID.Config["HideKey"] ~= -1 or EID.Config["HideButton"] ~= -1 then
|
||||||
local hotkeyString = InputHelper.KeyboardToString[EID.Config["HideKey"]] or InputHelper.ControllerToString[EID.Config["HideButton"]]
|
local hotkeyString = InputHelper.KeyboardToString[EID.Config["HideKey"]] or InputHelper.ControllerToString[EID.Config["HideButton"]]
|
||||||
return EID.isHidden and ("~~~~~~~ " .. hotkeyString .." to show ~~~~~~~~") or ""
|
return EID.isHidden and ("~~~~~~~ " .. hotkeyString .." to show ~~~~~~~~") or ""
|
||||||
@@ -289,6 +314,7 @@ if MCMLoaded then
|
|||||||
|
|
||||||
MCM.AddSpace("EID", "General")
|
MCM.AddSpace("EID", "General")
|
||||||
|
|
||||||
|
-- Position / Textbox Size
|
||||||
EID:AddNumberSetting("General", "XPosition", "Position X", 0, 500, {modifyBy = 5, infoText = "Default = 60"})
|
EID:AddNumberSetting("General", "XPosition", "Position X", 0, 500, {modifyBy = 5, infoText = "Default = 60"})
|
||||||
EID:AddNumberSetting("General", "YPosition", "Position Y", 0, 500, {modifyBy = 5, infoText = "Default = 45"})
|
EID:AddNumberSetting("General", "YPosition", "Position Y", 0, 500, {modifyBy = 5, infoText = "Default = 45"})
|
||||||
EID:AddNumberSetting("General", "LineHeight", "Line Height", 1, 30, {infoText = "Default = 11 (varies per language)"})
|
EID:AddNumberSetting("General", "LineHeight", "Line Height", 1, 30, {infoText = "Default = 11 (varies per language)"})
|
||||||
@@ -318,24 +344,8 @@ if MCMLoaded then
|
|||||||
|
|
||||||
-- maxDistance
|
-- maxDistance
|
||||||
local distances = {1, 1.5, 2, 3, 4, 5, 6, 7, 8, 9, 10}
|
local distances = {1, 1.5, 2, 3, 4, 5, 6, 7, 8, 9, 10}
|
||||||
MCM.AddSetting(
|
EID:AddScrollSetting("General", "MaxDistance", "Max Distance", distances, {label = " Grids",
|
||||||
"EID",
|
infoText = "Distance to the object until descriptions are displayed."})
|
||||||
"General",
|
|
||||||
{
|
|
||||||
Type = ModConfigMenu.OptionType.SCROLL,
|
|
||||||
CurrentSetting = function()
|
|
||||||
return AnIndexOf(distances, EID.Config["MaxDistance"]) - 1
|
|
||||||
end,
|
|
||||||
Display = function()
|
|
||||||
return "Max Distance: $scroll" ..
|
|
||||||
AnIndexOf(distances, EID.Config["MaxDistance"]) - 1 .. " " .. EID.Config["MaxDistance"] .. " Grids"
|
|
||||||
end,
|
|
||||||
OnChange = function(currentNum)
|
|
||||||
EID.Config["MaxDistance"] = distances[currentNum + 1]
|
|
||||||
end,
|
|
||||||
Info = {"Distance to the object until descriptions are displayed."}
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
--------Reset to default
|
--------Reset to default
|
||||||
MCM.AddSpace("EID", "General")
|
MCM.AddSpace("EID", "General")
|
||||||
@@ -347,8 +357,15 @@ if MCMLoaded then
|
|||||||
Type = ModConfigMenu.OptionType.BOOLEAN,
|
Type = ModConfigMenu.OptionType.BOOLEAN,
|
||||||
CurrentSetting = function() return true end,
|
CurrentSetting = function() return true end,
|
||||||
Display = function() return "<---- RESET CONFIG TO DEFAULT ---->" end,
|
Display = function() return "<---- RESET CONFIG TO DEFAULT ---->" end,
|
||||||
OnChange = function(currentBool) EID.Config = EID.DefaultConfig end,
|
OnChange = function(currentBool)
|
||||||
Info = {"Press this reset the config back to its default values"}
|
local resetFont = (EID.Config["FontType"] ~= "default")
|
||||||
|
for k,v in pairs(EID.DefaultConfig) do EID.Config[k] = v end
|
||||||
|
EID.MCM_OptionChanged = true
|
||||||
|
EID.RefreshBagTextbox = true
|
||||||
|
if resetFont then EID:loadFont(EID.modPath .. "resources/font/eid_"..EID.Config["FontType"]..".fnt") end
|
||||||
|
renderDummyDesc(true)
|
||||||
|
end,
|
||||||
|
Info = {"Press this to reset the config back to its default values"}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -367,247 +384,49 @@ if MCMLoaded then
|
|||||||
EID:AddBooleanSetting("Display", "DisplayCraneInfo", "Crane Game Infos", {repOnly = true})
|
EID:AddBooleanSetting("Display", "DisplayCraneInfo", "Crane Game Infos", {repOnly = true})
|
||||||
EID:AddBooleanSetting("Display", "DisplayVoidStatInfo", "Void Stat Increase Infos")
|
EID:AddBooleanSetting("Display", "DisplayVoidStatInfo", "Void Stat Increase Infos")
|
||||||
|
|
||||||
local diceSteps = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}
|
local diceSteps = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
|
||||||
if REPENTANCE then
|
-- Spindown Dice Settings
|
||||||
|
if REPENTANCE then MCM.AddSpace("EID", "Display") end
|
||||||
MCM.AddSpace("EID", "Display")
|
|
||||||
|
|
||||||
-- Spindown Dice results
|
EID:AddScrollSetting("Display", "SpindownDiceResults", "Spindown Dice", diceSteps, {repOnly = true, label = " Items",
|
||||||
MCM.AddSetting(
|
infoText = "Number of item previews when holding Spindown Dice"})
|
||||||
"EID",
|
|
||||||
"Display",
|
-- Display IDs for Spindown Dice results
|
||||||
{
|
EID:AddBooleanSetting("Display", "SpindownDiceDisplayID", "Display IDs",
|
||||||
Type = ModConfigMenu.OptionType.SCROLL,
|
{repOnly = true, infoText = "Display IDs for Spindown Dice results"})
|
||||||
CurrentSetting = function()
|
-- Display names for Spindown Dice results
|
||||||
return AnIndexOf(diceSteps, EID.Config["SpindownDiceResults"]) - 1
|
EID:AddBooleanSetting("Display", "SpindownDiceDisplayName", "Display names",
|
||||||
end,
|
{repOnly = true, infoText = "Display names for Spindown Dice results"})
|
||||||
Display = function()
|
-- Spindown Dice skip locked items
|
||||||
return "Spindown Dice: $scroll" ..
|
EID:AddBooleanSetting("Display", "SpindownDiceSkipLocked", "Skip Locked Items",
|
||||||
AnIndexOf(diceSteps, EID.Config["SpindownDiceResults"]) - 1 .. " " .. EID.Config["SpindownDiceResults"] .. " Items"
|
{repOnly = true, infoText = "Skip locked items in the preview just as the dice will; the method to check for unlock status is not perfect, though"})
|
||||||
end,
|
|
||||||
OnChange = function(currentNum)
|
|
||||||
EID.Config["SpindownDiceResults"] = diceSteps[currentNum + 1]
|
|
||||||
end,
|
|
||||||
Info = {"Preview of Items resulting when using the Spindown dice X times"}
|
|
||||||
}
|
|
||||||
)
|
|
||||||
--
|
|
||||||
-- Display IDs for Spindown Dice results
|
|
||||||
EID:AddBooleanSetting("Display", "SpindownDiceDisplayID", "Display IDs",
|
|
||||||
{repOnly = true, infoText = "Display IDs for Spindown Dice results"})
|
|
||||||
-- Display names for Spindown Dice results
|
|
||||||
EID:AddBooleanSetting("Display", "SpindownDiceDisplayName", "Display names",
|
|
||||||
{repOnly = true, infoText = "Display names for Spindown Dice results"})
|
|
||||||
|
|
||||||
-- Spindown Dice skip locked items
|
|
||||||
EID:AddBooleanSetting("Display", "SpindownDiceSkipLocked", "Skip Locked Items",
|
|
||||||
{repOnly = true, infoText = "Skip locked items in the preview just as the dice will; the method to check for unlock status is not perfect, though"})
|
|
||||||
end
|
|
||||||
|
|
||||||
--------Obstruction---------
|
--------Obstruction---------
|
||||||
MCM.AddSpace("EID", "Display")
|
MCM.AddSpace("EID", "Display")
|
||||||
MCM.AddText("EID", "Display", "Display Infos when obstructed")
|
MCM.AddText("EID", "Display", "Display Infos when Obstructed")
|
||||||
|
|
||||||
MCM.AddSetting(
|
EID:AddBooleanSetting("Display", "DisableObstructionOnFlight", "Show again when you have Flight")
|
||||||
"EID",
|
EID:AddBooleanSetting("Display", "DisplayObstructedCardInfo", "Obstructed Card Infos")
|
||||||
"Display",
|
EID:AddBooleanSetting("Display", "DisplayObstructedPillInfo", "Obstructed Pill Infos")
|
||||||
{
|
EID:AddBooleanSetting("Display", "DisplayObstructedSoulstoneInfo", "Obstructed Soulstone Infos", {repOnly = true})
|
||||||
Type = ModConfigMenu.OptionType.BOOLEAN,
|
|
||||||
CurrentSetting = function()
|
|
||||||
return EID.Config["DisableObstructionOnFlight"]
|
|
||||||
end,
|
|
||||||
Display = function()
|
|
||||||
local onOff = "False"
|
|
||||||
if EID.Config["DisableObstructionOnFlight"] then
|
|
||||||
onOff = "True"
|
|
||||||
end
|
|
||||||
return "Show again when having flight: " .. onOff
|
|
||||||
end,
|
|
||||||
OnChange = function(currentBool)
|
|
||||||
EID.Config["DisableObstructionOnFlight"] = currentBool
|
|
||||||
end
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
MCM.AddSetting(
|
-------Shop Spoilers-------
|
||||||
"EID",
|
|
||||||
"Display",
|
|
||||||
{
|
|
||||||
Type = ModConfigMenu.OptionType.BOOLEAN,
|
|
||||||
CurrentSetting = function()
|
|
||||||
return EID.Config["DisplayObstructedCardInfo"]
|
|
||||||
end,
|
|
||||||
Display = function()
|
|
||||||
local onOff = "False"
|
|
||||||
if EID.Config["DisplayObstructedCardInfo"] then
|
|
||||||
onOff = "True"
|
|
||||||
end
|
|
||||||
return "Card Infos: " .. onOff
|
|
||||||
end,
|
|
||||||
OnChange = function(currentBool)
|
|
||||||
EID.Config["DisplayObstructedCardInfo"] = currentBool
|
|
||||||
end
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
if REPENTANCE then
|
|
||||||
MCM.AddSetting(
|
|
||||||
"EID",
|
|
||||||
"Display",
|
|
||||||
{
|
|
||||||
Type = ModConfigMenu.OptionType.BOOLEAN,
|
|
||||||
CurrentSetting = function()
|
|
||||||
return EID.Config["DisplayObstructedSoulstoneInfo"]
|
|
||||||
end,
|
|
||||||
Display = function()
|
|
||||||
local onOff = "False"
|
|
||||||
if EID.Config["DisplayObstructedSoulstoneInfo"] then
|
|
||||||
onOff = "True"
|
|
||||||
end
|
|
||||||
return "Soulstone Infos: " .. onOff
|
|
||||||
end,
|
|
||||||
OnChange = function(currentBool)
|
|
||||||
EID.Config["DisplayObstructedSoulstoneInfo"] = currentBool
|
|
||||||
end
|
|
||||||
}
|
|
||||||
)
|
|
||||||
end
|
|
||||||
|
|
||||||
MCM.AddSetting(
|
|
||||||
"EID",
|
|
||||||
"Display",
|
|
||||||
{
|
|
||||||
Type = ModConfigMenu.OptionType.BOOLEAN,
|
|
||||||
CurrentSetting = function()
|
|
||||||
return EID.Config["DisplayObstructedPillInfo"]
|
|
||||||
end,
|
|
||||||
Display = function()
|
|
||||||
local onOff = "False"
|
|
||||||
if EID.Config["DisplayObstructedPillInfo"] then
|
|
||||||
onOff = "True"
|
|
||||||
end
|
|
||||||
return "Pill Infos: " .. onOff
|
|
||||||
end,
|
|
||||||
OnChange = function(currentBool)
|
|
||||||
EID.Config["DisplayObstructedPillInfo"] = currentBool
|
|
||||||
end
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
MCM.AddSpace("EID", "Display")
|
MCM.AddSpace("EID", "Display")
|
||||||
MCM.AddText("EID", "Display", "Display Infos in Shops")
|
MCM.AddText("EID", "Display", "Display Infos in Shops")
|
||||||
------------CARDS--------------
|
|
||||||
|
|
||||||
MCM.AddSetting(
|
|
||||||
"EID",
|
|
||||||
"Display",
|
|
||||||
{
|
|
||||||
Type = ModConfigMenu.OptionType.BOOLEAN,
|
|
||||||
CurrentSetting = function()
|
|
||||||
return EID.Config["DisplayCardInfoShop"]
|
|
||||||
end,
|
|
||||||
Display = function()
|
|
||||||
local onOff = "False"
|
|
||||||
if EID.Config["DisplayCardInfoShop"] then
|
|
||||||
onOff = "True"
|
|
||||||
end
|
|
||||||
return "Card Infos: " .. onOff
|
|
||||||
end,
|
|
||||||
OnChange = function(currentBool)
|
|
||||||
EID.Config["DisplayCardInfoShop"] = currentBool
|
|
||||||
end
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
------------PILLS--------------
|
|
||||||
MCM.AddSetting(
|
|
||||||
"EID",
|
|
||||||
"Display",
|
|
||||||
{
|
|
||||||
Type = ModConfigMenu.OptionType.BOOLEAN,
|
|
||||||
CurrentSetting = function()
|
|
||||||
return EID.Config["DisplayPillInfoShop"]
|
|
||||||
end,
|
|
||||||
Display = function()
|
|
||||||
local onOff = "False"
|
|
||||||
if EID.Config["DisplayPillInfoShop"] then
|
|
||||||
onOff = "True"
|
|
||||||
end
|
|
||||||
return "Pill Infos: " .. onOff
|
|
||||||
end,
|
|
||||||
OnChange = function(currentBool)
|
|
||||||
EID.Config["DisplayPillInfoShop"] = currentBool
|
|
||||||
end
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
|
EID:AddBooleanSetting("Display", "DisplayCardInfoShop", "Shop Card Infos")
|
||||||
|
EID:AddBooleanSetting("Display", "DisplayPillInfoShop", "Shop Pill Infos")
|
||||||
|
EID:AddBooleanSetting("Display", "DisplaySoulstoneInfoShop", "Shop Soulstone Infos", {repOnly = true})
|
||||||
|
|
||||||
|
----"Options?" Spoilers----
|
||||||
if REPENTANCE then
|
if REPENTANCE 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
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
MCM.AddSpace("EID", "Display")
|
MCM.AddSpace("EID", "Display")
|
||||||
MCM.AddText("EID", "Display", "Interaction with 'Options?'")
|
MCM.AddText("EID", "Display", "Interaction with 'Options?'")
|
||||||
|
|
||||||
MCM.AddSetting(
|
|
||||||
"EID",
|
|
||||||
"Display",
|
|
||||||
{
|
|
||||||
Type = ModConfigMenu.OptionType.BOOLEAN,
|
|
||||||
CurrentSetting = function()
|
|
||||||
return EID.Config["DisplayCardInfoOptions?"]
|
|
||||||
end,
|
|
||||||
Display = function()
|
|
||||||
local onOff = "False"
|
|
||||||
if EID.Config["DisplayCardInfoOptions?"] then
|
|
||||||
onOff = "True"
|
|
||||||
end
|
|
||||||
return "Card Infos when spawned by 'Options?': " .. onOff
|
|
||||||
end,
|
|
||||||
OnChange = function(currentBool)
|
|
||||||
EID.Config["DisplayCardInfoOptions?"] = currentBool
|
|
||||||
end
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
MCM.AddSetting(
|
|
||||||
"EID",
|
|
||||||
"Display",
|
|
||||||
{
|
|
||||||
Type = ModConfigMenu.OptionType.BOOLEAN,
|
|
||||||
CurrentSetting = function()
|
|
||||||
return EID.Config["DisplayPillInfoOptions?"]
|
|
||||||
end,
|
|
||||||
Display = function()
|
|
||||||
local onOff = "False"
|
|
||||||
if EID.Config["DisplayPillInfoOptions?"] then
|
|
||||||
onOff = "True"
|
|
||||||
end
|
|
||||||
return "Pill Infos when spawned by 'Options?': " .. onOff
|
|
||||||
end,
|
|
||||||
OnChange = function(currentBool)
|
|
||||||
EID.Config["DisplayPillInfoOptions?"] = currentBool
|
|
||||||
end
|
|
||||||
}
|
|
||||||
)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
EID:AddBooleanSetting("Display", "DisplayCardInfoOptions?", "'Options?' Card Infos", {repOnly = true})
|
||||||
|
EID:AddBooleanSetting("Display", "DisplayPillInfoOptions?", "'Options?' Pill Infos", {repOnly = true})
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
---------------------------------Visuals-----------------------------------
|
---------------------------------Visuals-----------------------------------
|
||||||
-- Font Type
|
-- Font Type
|
||||||
@@ -626,43 +445,24 @@ if MCMLoaded then
|
|||||||
return "Font Type: " .. EID.Config["FontType"]
|
return "Font Type: " .. EID.Config["FontType"]
|
||||||
end,
|
end,
|
||||||
OnChange = function(currentNum)
|
OnChange = function(currentNum)
|
||||||
EID.Config["FontType"] = fontNames[currentNum]
|
if EID:canUseFontType(fontNames[currentNum]) then
|
||||||
EID.lineHeight = fonts[currentNum].lineHeight
|
EID.MCM_OptionChanged = true
|
||||||
EID.Config["TextboxWidth"] = fonts[currentNum].textboxWidth
|
EID.Config["FontType"] = fontNames[currentNum]
|
||||||
EID:fixDefinedFont()
|
EID.Config["LineHeight"] = fonts[currentNum].lineHeight or EID.Config["LineHeight"]
|
||||||
local fontFile = EID.Config["FontType"] or "default"
|
EID.Config["TextboxWidth"] = fonts[currentNum].textboxWidth or EID.Config["TextboxWidth"]
|
||||||
EID:loadFont(EID.modPath .. "resources/font/eid_"..fontFile..".fnt")
|
local fontFile = EID.Config["FontType"] or "default"
|
||||||
|
EID:loadFont(EID.modPath .. "resources/font/eid_"..fontFile..".fnt")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
-- Display Mode
|
-- Display Mode
|
||||||
-- Note: MCM's dummy desc doesn't play well with changing this at the moment!
|
|
||||||
local displayModes = {"default", "local"}
|
local displayModes = {"default", "local"}
|
||||||
local displayModeTips = {"default: text will be displayed in the top-left of the screen.", "local: text will be displayed under the described object."}
|
EID:AddNumberSetting("Visuals", "DisplayMode", "Display Mode", 1, #displayModes, {indexOf = displayModes,
|
||||||
MCM.AddSetting(
|
infoText = {"Changes display mode of descriptions", "Default: Text is displayed in the top left.", "Local: Text is displayed under the described object."}})
|
||||||
"EID",
|
|
||||||
"Visuals",
|
|
||||||
{
|
|
||||||
Type = ModConfigMenu.OptionType.NUMBER,
|
|
||||||
CurrentSetting = function()
|
|
||||||
return AnIndexOf(displayModes, EID.Config["DisplayMode"])
|
|
||||||
end,
|
|
||||||
Minimum = 1,
|
|
||||||
Maximum = #displayModes,
|
|
||||||
Display = function()
|
|
||||||
return "Display mode: " .. EID.Config["DisplayMode"]
|
|
||||||
end,
|
|
||||||
OnChange = function(currentNum)
|
|
||||||
EID.Config["DisplayMode"] = displayModes[currentNum]
|
|
||||||
end,
|
|
||||||
Info = function()
|
|
||||||
return {"Changes display mode of descriptions", displayModeTips[AnIndexOf(displayModes, EID.Config["DisplayMode"])]}
|
|
||||||
end
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
-- SCALE
|
-- Scale/Size
|
||||||
EID:AddNumberSetting("Visuals", "Size", "Text Size", 0.5, 2, {modifyBy = 0.25, onChangeFunc =
|
EID:AddNumberSetting("Visuals", "Size", "Text Size", 0.5, 2, {modifyBy = 0.25, onChangeFunc =
|
||||||
function(currentNum)
|
function(currentNum)
|
||||||
EID.MCM_OptionChanged = true
|
EID.MCM_OptionChanged = true
|
||||||
@@ -679,50 +479,12 @@ if MCMLoaded then
|
|||||||
EID:AddHotkeySetting("Visuals",
|
EID:AddHotkeySetting("Visuals",
|
||||||
"SizeHotkey", "Toggle Size (Keyboard)",
|
"SizeHotkey", "Toggle Size (Keyboard)",
|
||||||
{"Press this key to change the text size.", "Hold this key to smoothly change the text size."}, false)
|
{"Press this key to change the text size.", "Hold this key to smoothly change the text size."}, false)
|
||||||
|
|
||||||
-- Local Mode Centered or not
|
-- Local Mode Centered or not
|
||||||
MCM.AddSetting(
|
EID:AddBooleanSetting("Visuals", "LocalModeCentered", "Local Mode Centered")
|
||||||
"EID",
|
|
||||||
"Visuals",
|
|
||||||
{
|
|
||||||
Type = ModConfigMenu.OptionType.BOOLEAN,
|
|
||||||
CurrentSetting = function()
|
|
||||||
return EID.Config["LocalModeCentered"]
|
|
||||||
end,
|
|
||||||
Display = function()
|
|
||||||
local onOff = "False"
|
|
||||||
if EID.Config["LocalModeCentered"] then
|
|
||||||
onOff = "True"
|
|
||||||
end
|
|
||||||
return "Local mode centered: " .. onOff
|
|
||||||
end,
|
|
||||||
OnChange = function(currentBool)
|
|
||||||
EID.MCM_OptionChanged = true
|
|
||||||
EID.Config["LocalModeCentered"] = currentBool
|
|
||||||
end
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
-- Transparency
|
-- Transparency
|
||||||
local transparencies = {0.1, 0.175, 0.25, 0.3, 0.4, 0.5, 0.6, 0.75, 0.8, 0.9, 1}
|
local transparencies = {0.1, 0.175, 0.25, 0.3, 0.4, 0.5, 0.6, 0.75, 0.8, 0.9, 1}
|
||||||
MCM.AddSetting(
|
EID:AddScrollSetting("Visuals", "Transparency", "Transparency", transparencies)
|
||||||
"EID",
|
|
||||||
"Visuals",
|
|
||||||
{
|
|
||||||
Type = ModConfigMenu.OptionType.SCROLL,
|
|
||||||
CurrentSetting = function()
|
|
||||||
return AnIndexOf(transparencies, EID.Config["Transparency"]) - 1
|
|
||||||
end,
|
|
||||||
Display = function()
|
|
||||||
return "Transparency: $scroll" ..
|
|
||||||
AnIndexOf(transparencies, EID.Config["Transparency"]) - 1 .. " " .. EID.Config["Transparency"]
|
|
||||||
end,
|
|
||||||
OnChange = function(currentNum)
|
|
||||||
EID.MCM_OptionChanged = true
|
|
||||||
EID.Config["Transparency"] = transparencies[currentNum + 1]
|
|
||||||
end
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
MCM.AddSpace("EID", "Visuals")
|
MCM.AddSpace("EID", "Visuals")
|
||||||
|
|
||||||
@@ -737,25 +499,7 @@ if MCMLoaded then
|
|||||||
|
|
||||||
-------Mod indicator for modded items---------
|
-------Mod indicator for modded items---------
|
||||||
local modIndicatorDisplays = {"Both","Name only","Icon only", "None"}
|
local modIndicatorDisplays = {"Both","Name only","Icon only", "None"}
|
||||||
MCM.AddSetting(
|
EID:AddNumberSetting("Visuals", "ModIndicatorDisplay", "Display Mod Indicator", 1, #modIndicatorDisplays, {indexOf = modIndicatorDisplays})
|
||||||
"EID",
|
|
||||||
"Visuals",
|
|
||||||
{
|
|
||||||
Type = ModConfigMenu.OptionType.NUMBER,
|
|
||||||
CurrentSetting = function()
|
|
||||||
return AnIndexOf(modIndicatorDisplays, EID.Config["ModIndicatorDisplay"])
|
|
||||||
end,
|
|
||||||
Minimum = 1,
|
|
||||||
Maximum = #modIndicatorDisplays,
|
|
||||||
Display = function()
|
|
||||||
return "Mod indicator displayed for: " .. EID.Config["ModIndicatorDisplay"]
|
|
||||||
end,
|
|
||||||
OnChange = function(currentNum)
|
|
||||||
EID.MCM_OptionChanged = true
|
|
||||||
EID.Config["ModIndicatorDisplay"] = modIndicatorDisplays[currentNum]
|
|
||||||
end
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
-----------------------------BAG OF CRAFTING-------------------------------
|
-----------------------------BAG OF CRAFTING-------------------------------
|
||||||
@@ -763,144 +507,44 @@ if MCMLoaded then
|
|||||||
if REPENTANCE then
|
if REPENTANCE then
|
||||||
-- Bag of Crafting Display
|
-- Bag of Crafting Display
|
||||||
local bagDisplays = {"always","hold","never"}
|
local bagDisplays = {"always","hold","never"}
|
||||||
MCM.AddSetting(
|
EID:AddNumberSetting("Crafting", "DisplayBagOfCrafting", "Show Display", 1, #bagDisplays, { displayingTab = "Crafting", indexOf = bagDisplays, infoText = {"Always = Always show Results", "Hold = Show when holding up bag", "Never = Disable Bag of Crafting feature"}})
|
||||||
"EID",
|
|
||||||
"Crafting",
|
|
||||||
{
|
|
||||||
Type = ModConfigMenu.OptionType.NUMBER,
|
|
||||||
CurrentSetting = function()
|
|
||||||
return AnIndexOf(bagDisplays, EID.Config["DisplayBagOfCrafting"])
|
|
||||||
end,
|
|
||||||
Minimum = 1,
|
|
||||||
Maximum = 3,
|
|
||||||
Display = function()
|
|
||||||
EID.MCMCompat_isDisplayingEIDTab = "Crafting"
|
|
||||||
return "Show Display: " .. EID.Config["DisplayBagOfCrafting"]
|
|
||||||
end,
|
|
||||||
OnChange = function(currentNum)
|
|
||||||
EID.MCM_OptionChanged = true
|
|
||||||
EID.Config["DisplayBagOfCrafting"] = bagDisplays[currentNum]
|
|
||||||
end,
|
|
||||||
Info = {"Always = Always show Results, Hold = Show when holding up bag, Never = Never show results"}
|
|
||||||
}
|
|
||||||
)
|
|
||||||
-- Bag of Crafting Display Mode
|
-- Bag of Crafting Display Mode
|
||||||
local bagDisplayModes = {"Recipe List","Preview Only","No Recipes","Pickups Only"}
|
local bagDisplayModes = {"Recipe List","Preview Only","No Recipes","Pickups Only"}
|
||||||
MCM.AddSetting(
|
EID:AddNumberSetting("Crafting", "BagOfCraftingDisplayMode", "Display Mode", 1, #bagDisplayModes, { indexOf = bagDisplayModes,
|
||||||
"EID",
|
infoText = {"Toggle showing a list of recipes, an item preview when bag is full, what item pool/quality you might get, or only the floor pickups"}})
|
||||||
"Crafting",
|
|
||||||
{
|
|
||||||
Type = ModConfigMenu.OptionType.NUMBER,
|
|
||||||
CurrentSetting = function()
|
|
||||||
return AnIndexOf(bagDisplayModes, EID.Config["BagOfCraftingDisplayMode"])
|
|
||||||
end,
|
|
||||||
Minimum = 1,
|
|
||||||
Maximum = 4,
|
|
||||||
Display = function()
|
|
||||||
return "Display Mode: " .. EID.Config["BagOfCraftingDisplayMode"]
|
|
||||||
end,
|
|
||||||
OnChange = function(currentNum)
|
|
||||||
EID.MCM_OptionChanged = true
|
|
||||||
EID.Config["BagOfCraftingDisplayMode"] = bagDisplayModes[currentNum]
|
|
||||||
end,
|
|
||||||
Info = {"Toggle showing a list of recipes, an item preview when bag is full, what item pool/quality you might get, or only the floor pickups"}
|
|
||||||
}
|
|
||||||
)
|
|
||||||
-- Bag of Crafting Hide in Battle
|
-- Bag of Crafting Hide in Battle
|
||||||
EID:AddBooleanSetting("Crafting", "BagOfCraftingHideInBattle", "Hide in Battle",
|
EID:AddBooleanSetting("Crafting", "BagOfCraftingHideInBattle", "Hide in Battle", {onText = "Yes", offText = "No",
|
||||||
{onText = "Yes", offText = "No",
|
infoText = "Hides the recipe list when in a fight"})
|
||||||
infoText = "Hides the recipe list when in a fight"})
|
|
||||||
-- Bag of Crafting 8 icons toggle
|
-- Bag of Crafting 8 icons toggle
|
||||||
EID:AddBooleanSetting("Crafting", "BagOfCraftingDisplayIcons", "Show Recipes/Best Bag as",
|
EID:AddBooleanSetting("Crafting", "BagOfCraftingDisplayIcons", "Show Recipes/Best Bag as", {onText = "8 Icons", offText = "Groups",
|
||||||
{onText = "8 Icons", offText = "Groups",
|
infoText = "Choose if you want recipes (and the Best Quality bag in No Recipes Mode) shown as 8 icons, or as grouped ingredients"})
|
||||||
infoText = "Choose if you want recipes (and the Best Quality bag in No Recipes Mode) shown as 8 icons, or as grouped ingredients"})
|
-- Modded Recipes toggle
|
||||||
|
EID:AddBooleanSetting("Crafting", "BagOfCraftingModdedRecipes", "Load Modded Item Recipes", {
|
||||||
|
infoText = "Enable or disable modded item support; if you have a lot of modded items, it will slow down game launch"})
|
||||||
|
|
||||||
MCM.AddSpace("EID", "Crafting")
|
MCM.AddSpace("EID", "Crafting")
|
||||||
MCM.AddText("EID", "Crafting", function() return "Recipe List Options" end)
|
MCM.AddText("EID", "Crafting", function() return "Recipe List Options" end)
|
||||||
|
|
||||||
-- Bag of Crafting results per page
|
-- Bag of Crafting results per page
|
||||||
MCM.AddSetting(
|
local bagSteps = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}
|
||||||
"EID",
|
EID:AddScrollSetting("Crafting", "BagOfCraftingResults", "Displayed Recipes", bagSteps,
|
||||||
"Crafting",
|
{ infoText = "Page size for the preview of items currently craftable with Bag of Crafting"})
|
||||||
{
|
|
||||||
Type = ModConfigMenu.OptionType.SCROLL,
|
|
||||||
CurrentSetting = function()
|
|
||||||
return AnIndexOf(diceSteps, EID.Config["BagOfCraftingResults"]) - 1
|
|
||||||
end,
|
|
||||||
Display = function()
|
|
||||||
return "Displayed Results: $scroll" ..
|
|
||||||
AnIndexOf(diceSteps, EID.Config["BagOfCraftingResults"]) - 1 .. " " .. EID.Config["BagOfCraftingResults"]
|
|
||||||
end,
|
|
||||||
OnChange = function(currentNum)
|
|
||||||
EID.MCM_OptionChanged = true
|
|
||||||
EID.Config["BagOfCraftingResults"] = diceSteps[currentNum + 1]
|
|
||||||
end,
|
|
||||||
Info = {"Page size for the preview of items currently craftable with Bag of Crafting"}
|
|
||||||
}
|
|
||||||
)
|
|
||||||
-- Bag of Crafting thorough recipe checks
|
-- Bag of Crafting thorough recipe checks
|
||||||
local combSteps = {8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18}
|
local combSteps = {8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18}
|
||||||
MCM.AddSetting(
|
EID:AddScrollSetting("Crafting", "BagOfCraftingCombinationMax", "Thorough Calculations", combSteps,
|
||||||
"EID",
|
{ infoText = {"Get every recipe for the X best components; setting this high slows down recipe checking", "(12 = 500 combinations, 14 = 3,000, 16 = 13,000)"}})
|
||||||
"Crafting",
|
|
||||||
{
|
|
||||||
Type = ModConfigMenu.OptionType.SCROLL,
|
|
||||||
CurrentSetting = function()
|
|
||||||
return AnIndexOf(combSteps, EID.Config["BagOfCraftingCombinationMax"]) - 1
|
|
||||||
end,
|
|
||||||
Display = function()
|
|
||||||
return "Thorough Calculations: $scroll" ..
|
|
||||||
AnIndexOf(combSteps, EID.Config["BagOfCraftingCombinationMax"]) - 1 .. " " .. EID.Config["BagOfCraftingCombinationMax"]
|
|
||||||
end,
|
|
||||||
OnChange = function(currentNum)
|
|
||||||
EID.Config["BagOfCraftingCombinationMax"] = combSteps[currentNum + 1]
|
|
||||||
end,
|
|
||||||
Info = {"Get every recipe for the X best components; setting this high will cause lag spikes (12 = 500 combinations, 14 = 3,000, 16 = 13,000)"}
|
|
||||||
}
|
|
||||||
)
|
|
||||||
-- Bag of Crafting random recipe checks
|
-- Bag of Crafting random recipe checks
|
||||||
local calcSteps = {200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200}
|
local calcSteps = {200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200}
|
||||||
MCM.AddSetting(
|
EID:AddScrollSetting("Crafting", "BagOfCraftingRandomResults", "Random Calculations", calcSteps,
|
||||||
"EID",
|
{ infoText = "An additional X number of randomly chosen recipes will be checked, changing each pickup spawn/despawn or refresh"})
|
||||||
"Crafting",
|
|
||||||
{
|
|
||||||
Type = ModConfigMenu.OptionType.SCROLL,
|
|
||||||
CurrentSetting = function()
|
|
||||||
return AnIndexOf(calcSteps, EID.Config["BagOfCraftingRandomResults"]) - 1
|
|
||||||
end,
|
|
||||||
Display = function()
|
|
||||||
return "Random Calculations: $scroll" ..
|
|
||||||
AnIndexOf(calcSteps, EID.Config["BagOfCraftingRandomResults"]) - 1 .. " " .. EID.Config["BagOfCraftingRandomResults"]
|
|
||||||
end,
|
|
||||||
OnChange = function(currentNum)
|
|
||||||
EID.Config["BagOfCraftingRandomResults"] = calcSteps[currentNum + 1]
|
|
||||||
end,
|
|
||||||
Info = {"An additional X number of randomly chosen recipes will be checked, changing each pickup spawn/despawn or refresh"}
|
|
||||||
}
|
|
||||||
)
|
|
||||||
-- Bag of Crafting item names
|
-- Bag of Crafting item names
|
||||||
MCM.AddSetting(
|
EID:AddBooleanSetting("Crafting", "BagOfCraftingDisplayNames", "Show Item Names",
|
||||||
"EID",
|
{ infoText = "If on, each recipe result takes two lines, one for the item name, one for the recipe"})
|
||||||
"Crafting",
|
|
||||||
{
|
|
||||||
Type = ModConfigMenu.OptionType.BOOLEAN,
|
|
||||||
CurrentSetting = function()
|
|
||||||
return EID.Config["BagOfCraftingDisplayNames"]
|
|
||||||
end,
|
|
||||||
Display = function()
|
|
||||||
local onOff = "False"
|
|
||||||
if EID.Config["BagOfCraftingDisplayNames"] then
|
|
||||||
onOff = "True"
|
|
||||||
end
|
|
||||||
return "Show Item Names: " .. onOff
|
|
||||||
end,
|
|
||||||
OnChange = function(currentBool)
|
|
||||||
EID.MCM_OptionChanged = true
|
|
||||||
EID.Config["BagOfCraftingDisplayNames"] = currentBool
|
|
||||||
end,
|
|
||||||
Info = {"If on, each result takes two lines; lower your displayed results accordingly"}
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
MCM.AddSpace("EID", "Crafting")
|
MCM.AddSpace("EID", "Crafting")
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user