public static void FinishedLoading(List <string> loadOrder, Dictionary <string, Dictionary <string, VersionManifestEntry> > customResources) { Logger.M.TWL(0, "FinishedLoading", true); try { foreach (string name in loadOrder) { if (name == "CustomUnits") { CustomUnitsAPI.CustomUnitsDetected(); break; } ; } foreach (var customResource in customResources) { Logger.M.TWL(0, "customResource:" + customResource.Key); if (customResource.Key == nameof(DropSlotDef)) { List <DropSlotDef> defs = new List <DropSlotDef>(); foreach (var custItem in customResource.Value) { try { Logger.M.WL(1, "Path:" + custItem.Value.FilePath); DropSlotDef def = JsonConvert.DeserializeObject <DropSlotDef>(File.ReadAllText(custItem.Value.FilePath)); Logger.M.WL(1, "id:" + def.Description.Id); Logger.M.WL(1, JsonConvert.SerializeObject(def, Formatting.Indented)); def.Register(); defs.Add(def); } catch (Exception e) { Logger.M.TWL(0, custItem.Key, true); Logger.M.WL(0, e.ToString(), true); } } DropManager.FindSlotOrder(defs); } } } catch (Exception e) { Logger.M.TWL(0, e.ToString(), true); } }