Added config validator and changed behavior of hidden state storage config flag

This commit is contained in:
Wofsauge committed 2021-06-25 21:31:14 +02:00
1 parent 4b248762bc
commit b2b869d9a9
3 files changed
+15 -13

No files matched your search

+4 -5
View File
@@ -187,18 +187,17 @@ if MCMLoaded then
{
Type = ModConfigMenu.OptionType.BOOLEAN,
CurrentSetting = function()
return EID.isHidden
return EID.Config["InitiallyHidden"]
end,
Display = function()
local onOff = "False"
if EID.isHidden then
if EID.Config["InitiallyHidden"] then
onOff = "True"
end
return 'Is Hidden: ' .. onOff
return 'Is initially Hidden: ' .. onOff
end,
OnChange = function(currentBool)
EID.Config["Hidden"] = currentBool
EID.isHidden = currentBool
EID.Config["InitiallyHidden"] = currentBool
end
}
)