mirror of
https://github.com/BepInEx/BepInEx.git
synced 2026-10-20 01:46:13 +00:00
Write default values to config on get
This commit is contained in:
1 parent
0acf245fec
commit
79e1446bd6
1 file changed
+6
@@ -60,12 +60,18 @@ namespace BepInEx
|
||||
Dictionary<string, string> subdict;
|
||||
|
||||
if (!cache.TryGetValue(section, out subdict))
|
||||
{
|
||||
SetEntry(key, defaultValue, section);
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
if (subdict.TryGetValue(key, out string value))
|
||||
return value;
|
||||
else
|
||||
{
|
||||
SetEntry(key, defaultValue, section);
|
||||
return defaultValue;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in new issue
Block a user