public void LoadAttributes(EntityTypeCollection entityTypeCollection, string customFile = "") { AttributesPatch attributesPatch = GetPatchObject(GetPatchData(customFile)); if (attributesPatch != null) { statsSheetSettings = attributesPatch.StatsSheetSettings; ApplyAttributesPatch(entityTypeCollection, attributesPatch); if (statsSheetSettings.Generate) { Console.WriteLine("[SUBSYSTEM] Generating stats sheet..."); new StatsSheetGenerator(statsSheetSettings).Generate(entityTypeCollection); Console.WriteLine("[SUBSYSTEM] Stats sheet generated!"); } } else { writer.WriteLine("Patch file empty, not found or json parse failed. See output_log.txt for details"); } string logName; if (customFile.Length > 0) { logName = MakeValidFileName($"Subsystem_{customFile}.log"); } else { logName = "Subsystem.log"; } File.WriteAllText(Path.Combine(DataFolderPath(), logName), writer.ToString()); }
public StatsSheetGenerator(StatsSheetSettings settings) { writer = new StringWriter(); this.settings = settings; }