Added repentogon config settings page

This commit is contained in:
Wofsauge committed 2024-01-12 21:38:07 +01:00
1 parent c8fd32cce6
commit f3871a1d1c
4 files changed
+107 -48

No files matched your search

+19
View File
@@ -414,6 +414,10 @@ EID.UserConfig = {
-- Default: 0 (Deactivate all Savegame features)
["SaveGameNumber"] = 0,
-- Highlight items, if they need to be collected for the collection page
-- Default: true
["ItemCollectionIndicator"] = true,
-- Color in which the name of an item should be highlighted, which needs to be collected for the collection page
-- Color names are defined in "eid_data.lua" (line 365)
-- Default: "ColorFade"
@@ -429,6 +433,17 @@ EID.UserConfig = {
-- Default = false
["ShowCursor"] = false,
---------- Repentogon ----------
-- The following options only affect features that require the API extention "Repentogon" to be installed.
-- Website: https://repentogon.com/index.html
-- Toggles descriptions to be visible, when using the item collection page in the main menu.
-- Default = true
["RGON_ShowOnCollectionPage"] = true,
---------- Misc ----------
-- Changes the number of results shown for the additional Spindown Dice description
@@ -581,9 +596,13 @@ EID.DefaultConfig = {
["SpindownDiceDisplayName"] = false,
["SpindownDiceSkipLocked"] = false,
["SaveGameNumber"] = 0,
["ItemCollectionIndicator"] = true,
["ItemCollectionColor"] = "ColorFade",
["EnableMouseControls"] = false,
["ShowCursor"] = false,
["RGON_ShowOnCollectionPage"] = true,
["ErrorMessage"] = "[Effect not defined]",
["TextColor"] = "ColorEIDText",
["ErrorColor"] = "ColorEIDError",
+86 -46
View File
@@ -694,49 +694,19 @@ if MCMLoaded then
end
---------------------------------------------------------------------------
----------------------------Savegame Config--------------------------------
if EID.SaveGame then
MCM.AddText("EID", "Save Game", function() EID.MCMCompat_isDisplayingEIDTab = ""; return "Loaded savegame data:" end)
MCM.AddText("EID", "Save Game", function() return EID.SaveGame.Platform .." User: "..EID.SaveGame.UserName.." ("..EID.SaveGame.UserID..")" end)
MCM.AddSpace("EID", "Save Game")
-- Show Item needs Collection
MCM.AddSetting(
"EID",
"Save Game",
{
Type = ModConfigMenu.OptionType.NUMBER,
CurrentSetting = function()
return EID.Config["SaveGameNumber"]
end,
Minimum = 0,
Maximum = 3,
Display = function()
if EID.Config["SaveGameNumber"] == 0 then
return "Current Save Game: 0 (Deactivated)"
end
return "Current Save Game: " .. EID.Config["SaveGameNumber"]
end,
OnChange = function(currentNum)
EID.MCM_OptionChanged = true
EID.Config["SaveGameNumber"] = currentNum
end,
Info = {"Save game you are currently on. This info needs to be set to get the correct lookup tables"}
}
)
MCM.AddText("EID", "Save Game", function()
if EID.Config["SaveGameNumber"] == 0 then return "" end
local count = 0
for k, v in pairs(EID.SaveGame[EID.Config["SaveGameNumber"]].ItemNeedsPickup) do
count = count + 1
end
return "Collection page items missing: "..count end)
MCM.AddSpace("EID", "Save Game")
-------------------------------REPENTOGON----------------------------------
if EID.isRepentance then
if not REPENTOGON then
-- show disclaimer, but also show available features
MCM.AddText("EID", "Repentogon", "You need to install REPENTOGON to use the following features:")
MCM.AddSpace("EID", "Repentogon")
end
EID:AddBooleanSetting("Repentogon", "ItemCollectionIndicator", "Highlight uncollected items",{ infoText = "Highlight items, if they need to be collected for the collection page"})
-- Needs collection Color
MCM.AddSetting(
"EID",
"Save Game",
"Repentogon",
{
Type = ModConfigMenu.OptionType.NUMBER,
CurrentSetting = function()
@@ -758,13 +728,83 @@ if MCMLoaded then
Info = {"Color in which item names are colored to highlight that this item needs to be collected for the collection page"}
}
)
else
MCM.AddSpace("EID", "Save Game")
MCM.AddSpace("EID", "Save Game")
MCM.AddText("EID", "Save Game", function() EID.MCMCompat_isDisplayingEIDTab = ""; return "To enable savegame related features," end)
MCM.AddText("EID", "Save Game", "please run \"scripts\\savegame_reader.exe\"")
MCM.AddText("EID", "Save Game", "found in the EID mod folder")
EID:AddBooleanSetting("Repentogon", "RGON_ShowOnCollectionPage", "Show descriptions on collection page", { infoText = "Displays item effects when navigating the collection page in the main menu."})
end
---------------------------------------------------------------------------
----------------------------Savegame Config--------------------------------
if not REPENTOGON then
if EID.SaveGame then
MCM.AddText("EID", "Save Game", function() EID.MCMCompat_isDisplayingEIDTab = ""; return "Loaded savegame data:" end)
MCM.AddText("EID", "Save Game", function() return EID.SaveGame.Platform .." User: "..EID.SaveGame.UserName.." ("..EID.SaveGame.UserID..")" end)
MCM.AddSpace("EID", "Save Game")
-- Show Item needs Collection
MCM.AddSetting(
"EID",
"Save Game",
{
Type = ModConfigMenu.OptionType.NUMBER,
CurrentSetting = function()
return EID.Config["SaveGameNumber"]
end,
Minimum = 0,
Maximum = 3,
Display = function()
if EID.Config["SaveGameNumber"] == 0 then
return "Current Save Game: 0 (Deactivated)"
end
return "Current Save Game: " .. EID.Config["SaveGameNumber"]
end,
OnChange = function(currentNum)
EID.MCM_OptionChanged = true
EID.Config["SaveGameNumber"] = currentNum
end,
Info = {"Save game you are currently on. This info needs to be set to get the correct lookup tables"}
}
)
MCM.AddText("EID", "Save Game", function()
if EID.Config["SaveGameNumber"] == 0 then return "" end
local count = 0
for k, v in pairs(EID.SaveGame[EID.Config["SaveGameNumber"]].ItemNeedsPickup) do
count = count + 1
end
return "Collection page items missing: "..count end)
MCM.AddSpace("EID", "Save Game")
EID:AddBooleanSetting("Repentogon", "ItemCollectionIndicator", "Highlight uncollected items")
-- Needs collection Color
MCM.AddSetting(
"EID",
"Save Game",
{
Type = ModConfigMenu.OptionType.NUMBER,
CurrentSetting = function()
return AnIndexOf(colorNameArray, EID.Config["ItemCollectionColor"])
end,
Minimum = 0,
Maximum = 1000,
Display = function()
if EID.Config["ItemCollectionColor"] == nil then EID.Config["ItemCollectionColor"] = EID.DefaultConfig["ItemCollectionColor"] end
EID.MCMCompat_isDisplayingEIDTab = "Visuals";
return "Collection Page Highlight color: " .. string.gsub(EID.Config["ItemCollectionColor"], "Color", "").. " ("..AnIndexOf(colorNameArray, EID.Config["ItemCollectionColor"]).."/"..#colorNameArray..")"
end,
OnChange = function(currentNum)
EID.MCM_OptionChanged = true
if currentNum == 0 then currentNum = #colorNameArray end
if currentNum > #colorNameArray then currentNum = 1 end
EID.Config["ItemCollectionColor"] = colorNameArray[currentNum]
end,
Info = {"Color in which item names are colored to highlight that this item needs to be collected for the collection page"}
}
)
else
MCM.AddSpace("EID", "Save Game")
MCM.AddSpace("EID", "Save Game")
MCM.AddText("EID", "Save Game", function() EID.MCMCompat_isDisplayingEIDTab = ""; return "To enable savegame related features," end)
MCM.AddText("EID", "Save Game", "please run \"scripts\\savegame_reader.exe\"")
MCM.AddText("EID", "Save Game", "found in the EID mod folder")
end
end -- if not repentogon
---------------------------------------------------------------------------
+1 -1
View File
@@ -805,7 +805,7 @@ local function EIDConditionsAB(descObj)
-- Collectible Pedestal Callbacks
if descObj.ObjVariant == PickupVariant.PICKUP_COLLECTIBLE then
if EID:requiredForCollectionPage(descObj.ObjSubType) then table.insert(callbacks, ItemCollectionPageCallback) end
if EID.Config["ItemCollectionIndicator"] and EID:requiredForCollectionPage(descObj.ObjSubType) then table.insert(callbacks, ItemCollectionPageCallback) end
if descObj.ObjSubType == 297 then table.insert(callbacks, PandorasBoxCallback) end
+1 -1
View File
@@ -53,7 +53,7 @@ end
local skipItemIDs = {}
function EID:OnMenuRender()
if MenuManager:GetActiveMenu() == MainMenuType.COLLECTION then
if EID.Config["RGON_ShowOnCollectionPage"] and MenuManager:GetActiveMenu() == MainMenuType.COLLECTION then
if #skipItemIDs == 0 then -- build list of items not listed in the collectionpage
local itemConfig = Isaac.GetItemConfig()
for i = 1, EID:GetMaxCollectibleID(), 1 do