diff --git a/PMCGenerator/Program.cs b/PMCGenerator/Program.cs index 2c0c15c..de7ff65 100644 --- a/PMCGenerator/Program.cs +++ b/PMCGenerator/Program.cs @@ -13,14 +13,9 @@ namespace PMCGenerator { static void Main(string[] args) { - var itemLibrary = GetItemLibraryFileAndParse(); + var itemLibrary = GetItemLibrary(); - var presetPath = CreateInputFolder("presets"); - - var presetFiles = GetPresetFileList(presetPath); - - // Parse into list of strongly typed objects - var parsedPresets = ParsePresetJsons(presetFiles); + var parsedPresets = GetPresets(); // Create flat lists of weapons + list of mods var flatPrimaryWeaponsList = GetWeaponsFromRawFile(parsedPresets); @@ -114,7 +109,10 @@ namespace PMCGenerator CreateJsonFile(outputPath, outputJson); } - private static Dictionary GetItemLibraryFileAndParse() + /// + /// Get a strongly typed dictionary of BSGs items library + /// + private static Dictionary GetItemLibrary() { CreateInputFolder(string.Empty); @@ -140,8 +138,14 @@ namespace PMCGenerator }; } - private static List ParsePresetJsons(List presetFiles) + /// + /// Get a list of all the presets in the input/presets folder and return as a list of strongly typed objects + /// + private static List GetPresets() { + var presetPath = CreateInputFolder("presets"); + var presetFiles = GetPresetFileList(presetPath); + var result = new List(); foreach (var presetFile in presetFiles) {