Skip to content

Commit

Permalink
refactor: client Settings/Config class
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaumearm committed Dec 29, 2024
1 parent 3db4ff5 commit f14992e
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions PTT-Plugin/Settings/Config.cs
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."
);
}
}

0 comments on commit f14992e

Please sign in to comment.