internal void InternalSetup() { if (ProgressionReplicator != null) { NET_Replicator.RemoveReplicator(ProgressionReplicator); } ProgressionReplicator = new NET_ProgressionReplicator(this); NET_Replicator.AddReplicator(ProgressionReplicator); if (IsLocallyOwned) { ProgressionData = ProgressionData.LoadFromFile(); } }
public static ProgressionData LoadFromFile() { if (ConfigManager.HasCustomContent) { var filePath = Path.Combine(ConfigManager.CustomPath, "Rundown_Progression.data"); ProgressionData data; if (!File.Exists(filePath)) { data = new ProgressionData(); File.WriteAllText(filePath, Newtonsoft.Json.JsonConvert.SerializeObject(data)); } else { data = Newtonsoft.Json.JsonConvert.DeserializeObject <ProgressionData>(File.ReadAllText(filePath)); } return(data); } return(null); }