public static void Load() { try { Directory.CreateDirectory(Main.SavePath + Path.DirectorySeparatorChar + Dir); jsonSkillList = new JsonNodeList(); //disable Load for Now /* * if (File.Exists(cPath)) * { * using (StreamReader reader = new StreamReader(cPath)) * { * * jsonSkillList = JsonConvert.DeserializeObject<JsonNodeList>(reader.ReadToEnd()); * } * } */ Save(); } catch (SystemException e) { AnotherRpgMod.Instance.Logger.Error(e.ToString()); } }
public static void Init() { try { cPath = (Main.SavePath + Path.DirectorySeparatorChar + Dir + Path.DirectorySeparatorChar + Name); jsonSkillList = new JsonNodeList(); Load(); } catch (SystemException e) { AnotherRpgMod.Instance.Logger.Error(e.ToString()); } }
public static void Load() { try { Directory.CreateDirectory(Main.SavePath + Path.DirectorySeparatorChar + Dir); cPath = (Main.SavePath + Path.DirectorySeparatorChar + Dir + Path.DirectorySeparatorChar + Name); jsonSkillList = new JsonNodeList(); if (File.Exists(cPath)) { using (StreamReader reader = new StreamReader(cPath)) { if (Config.gpConfig.UseCustomSkillTree) { jsonSkillList = JsonConvert.DeserializeObject <JsonNodeList>(reader.ReadToEnd()); } } } Save(); } catch (SystemException e) { AnotherRpgMod.Instance.Logger.Error(e.ToString()); } }