-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: client Settings/Config class
- Loading branch information
1 parent
3db4ff5
commit f14992e
Showing
1 changed file
with
6 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,20 @@ | ||
using System.Collections.Generic; | ||
using BepInEx.Configuration; | ||
|
||
namespace PTT.Settings; | ||
|
||
internal class Config | ||
{ | ||
private static readonly List<ConfigEntryBase> ConfigEntries = []; | ||
private const string TradersSection = "Traders"; | ||
|
||
internal static ConfigEntry<bool> ShowLockedTraders { get; set; } | ||
|
||
internal static void Init(ConfigFile config) | ||
{ | ||
ShowLockedTraders = config.Bind(TradersSection, "Show locked traders", false, "Please reload the traders page when you toggle this option."); | ||
ConfigEntries.Add(ShowLockedTraders); | ||
ShowLockedTraders = config.Bind( | ||
TradersSection, | ||
"Show locked traders", | ||
false, | ||
"Please reload the traders page when you toggle this option." | ||
); | ||
} | ||
} |