internal static List <Adjust> Load(string name, string path) { var rslt = new List <Adjust>(); if (!Directory.Exists(path)) { return(rslt); } foreach (var file in Directory.EnumerateFiles(path, "*.txt")) { var adjust = ModElementLoader.Load <Adjust>(file, File.ReadAllText(file)); adjust.file = file; adjust.key = Path.GetFileNameWithoutExtension(file); rslt.Add(adjust); } return(rslt); }
internal static List <Risk> Load(string mod, string path) { List <Risk> rslt = new List <Risk>(); if (!Directory.Exists(path)) { return(rslt); } foreach (var file in Directory.EnumerateFiles(path, "*.txt")) { var risk = ModElementLoader.Load <Risk>(file, File.ReadAllText(file)); risk.file = file; risk.key = Path.GetFileNameWithoutExtension(file); rslt.Add(risk); } return(rslt); }
internal static List <Party> Load(string modname, string path) { List <Party> rslt = new List <Party>(); if (!Directory.Exists(path)) { return(rslt); } foreach (var file in Directory.EnumerateFiles(path, "*.txt")) { var party = ModElementLoader.Load <Party>(file, File.ReadAllText(file)); party.file = path; party.key = Path.GetFileNameWithoutExtension(file); rslt.Add(party); } return(rslt); }