26 lines
757 B
C#
26 lines
757 B
C#
using System.Collections.Generic;
|
|
using System.IO;
|
|
using Data;
|
|
using Utils;
|
|
|
|
namespace Managers
|
|
{
|
|
public class DefineManager : Singleton<DefineManager>
|
|
{
|
|
private const string coreNamespace = "Data";
|
|
private static readonly string[] dataSetFilePath = { "Data", "Mod" };
|
|
|
|
public Dictionary<string, Dictionary<string, Define>> defines = new();
|
|
public Dictionary<string, DefinePack> packs = new();
|
|
|
|
public void Init()
|
|
{
|
|
var packFolder = Directory.GetDirectories(dataSetFilePath[0]);
|
|
foreach (var folder in packFolder)
|
|
{
|
|
var pack = new DefinePack();
|
|
if (pack.LoadPack(folder)) packs.Add(pack.packID, pack);
|
|
}
|
|
}
|
|
}
|
|
} |