JSON data table parsing stuff

This commit is contained in:
Kyle Belanger
2024-02-19 17:35:16 -05:00
parent 27acfdff08
commit f33a60d33c
16 changed files with 1392296 additions and 16 deletions

View File

@@ -0,0 +1,23 @@
using BLHX.Server.Common.Utils;
namespace BLHX.Server.Common.Data;
public class Config : Singleton<Config>
{
public string Address { get; set; } = "127.0.0.1";
public uint Port { get; set; } = 20000;
public static void Load()
{
Instance = JSON.Load<Config>(JSON.ConfigPath);
Logger.c.Log($"Config loaded");
}
public static void Save()
{
JSON.Save(JSON.ConfigPath, Instance);
Logger.c.Log("Config saved");
}
}