Added repentogon config settings page
This commit is contained in:
1 parent
c8fd32cce6
commit
f3871a1d1c
4 files changed
+106
-47
No files matched your search
@@ -414,6 +414,10 @@ EID.UserConfig = {
|
|||||||
-- Default: 0 (Deactivate all Savegame features)
|
-- Default: 0 (Deactivate all Savegame features)
|
||||||
["SaveGameNumber"] = 0,
|
["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 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)
|
-- Color names are defined in "eid_data.lua" (line 365)
|
||||||
-- Default: "ColorFade"
|
-- Default: "ColorFade"
|
||||||
@@ -429,6 +433,17 @@ EID.UserConfig = {
|
|||||||
-- Default = false
|
-- Default = false
|
||||||
["ShowCursor"] = 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 ----------
|
---------- Misc ----------
|
||||||
|
|
||||||
-- Changes the number of results shown for the additional Spindown Dice description
|
-- Changes the number of results shown for the additional Spindown Dice description
|
||||||
@@ -581,9 +596,13 @@ EID.DefaultConfig = {
|
|||||||
["SpindownDiceDisplayName"] = false,
|
["SpindownDiceDisplayName"] = false,
|
||||||
["SpindownDiceSkipLocked"] = false,
|
["SpindownDiceSkipLocked"] = false,
|
||||||
["SaveGameNumber"] = 0,
|
["SaveGameNumber"] = 0,
|
||||||
|
["ItemCollectionIndicator"] = true,
|
||||||
["ItemCollectionColor"] = "ColorFade",
|
["ItemCollectionColor"] = "ColorFade",
|
||||||
["EnableMouseControls"] = false,
|
["EnableMouseControls"] = false,
|
||||||
["ShowCursor"] = false,
|
["ShowCursor"] = false,
|
||||||
|
|
||||||
|
["RGON_ShowOnCollectionPage"] = true,
|
||||||
|
|
||||||
["ErrorMessage"] = "[Effect not defined]",
|
["ErrorMessage"] = "[Effect not defined]",
|
||||||
["TextColor"] = "ColorEIDText",
|
["TextColor"] = "ColorEIDText",
|
||||||
["ErrorColor"] = "ColorEIDError",
|
["ErrorColor"] = "ColorEIDError",
|
||||||
|
|||||||
+85
-45
@@ -694,49 +694,19 @@ if MCMLoaded then
|
|||||||
end
|
end
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
----------------------------Savegame Config--------------------------------
|
-------------------------------REPENTOGON----------------------------------
|
||||||
if EID.SaveGame then
|
if EID.isRepentance then
|
||||||
MCM.AddText("EID", "Save Game", function() EID.MCMCompat_isDisplayingEIDTab = ""; return "Loaded savegame data:" end)
|
if not REPENTOGON then
|
||||||
MCM.AddText("EID", "Save Game", function() return EID.SaveGame.Platform .." User: "..EID.SaveGame.UserName.." ("..EID.SaveGame.UserID..")" end)
|
-- show disclaimer, but also show available features
|
||||||
MCM.AddSpace("EID", "Save Game")
|
MCM.AddText("EID", "Repentogon", "You need to install REPENTOGON to use the following features:")
|
||||||
|
MCM.AddSpace("EID", "Repentogon")
|
||||||
-- Show Item needs Collection
|
end
|
||||||
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",{ infoText = "Highlight items, if they need to be collected for the collection page"})
|
||||||
-- Needs collection Color
|
-- Needs collection Color
|
||||||
MCM.AddSetting(
|
MCM.AddSetting(
|
||||||
"EID",
|
"EID",
|
||||||
"Save Game",
|
"Repentogon",
|
||||||
{
|
{
|
||||||
Type = ModConfigMenu.OptionType.NUMBER,
|
Type = ModConfigMenu.OptionType.NUMBER,
|
||||||
CurrentSetting = function()
|
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"}
|
Info = {"Color in which item names are colored to highlight that this item needs to be collected for the collection page"}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
else
|
EID:AddBooleanSetting("Repentogon", "RGON_ShowOnCollectionPage", "Show descriptions on collection page", { infoText = "Displays item effects when navigating the collection page in the main menu."})
|
||||||
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
|
||||||
|
---------------------------------------------------------------------------
|
||||||
|
----------------------------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
@@ -805,7 +805,7 @@ local function EIDConditionsAB(descObj)
|
|||||||
|
|
||||||
-- Collectible Pedestal Callbacks
|
-- Collectible Pedestal Callbacks
|
||||||
if descObj.ObjVariant == PickupVariant.PICKUP_COLLECTIBLE then
|
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
|
if descObj.ObjSubType == 297 then table.insert(callbacks, PandorasBoxCallback) end
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -53,7 +53,7 @@ end
|
|||||||
|
|
||||||
local skipItemIDs = {}
|
local skipItemIDs = {}
|
||||||
function EID:OnMenuRender()
|
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
|
if #skipItemIDs == 0 then -- build list of items not listed in the collectionpage
|
||||||
local itemConfig = Isaac.GetItemConfig()
|
local itemConfig = Isaac.GetItemConfig()
|
||||||
for i = 1, EID:GetMaxCollectibleID(), 1 do
|
for i = 1, EID:GetMaxCollectibleID(), 1 do
|
||||||
|
|||||||
Reference in new issue
Block a user