internal void Load(TagCompound tags) { string id = WorldIdentityLibraries.GetUniqueIdForCurrentWorld(true); if (tags.ContainsKey("half_days_elapsed_" + id)) { this.HalfDaysElapsed = tags.GetInt("half_days_elapsed_" + id); } }
//////////////// internal void Load() { string worldUid = WorldIdentityLibraries.GetUniqueIdForCurrentWorld(true); var filters = ModCustomDataFileLibraries.LoadJson <NihilismFilters>(NihilismMod.Instance, worldUid); this.FiltersSaveCopy = filters != null ? filters : this.FiltersSaveCopy; }
//////////////// public bool IsObjectiveByNameComplete(string objectiveTitle) { string worldUid = WorldIdentityLibraries.GetUniqueIdForCurrentWorld(true); if (!this.CompletedObjectivesPerWorld.ContainsKey(worldUid)) { return(false); } return(this.CompletedObjectivesPerWorld[worldUid].Contains(objectiveTitle)); }
public bool RecordCompletedObjective(string objectiveTitle) { string worldUid = WorldIdentityLibraries.GetUniqueIdForCurrentWorld(true); if (!this.CompletedObjectivesPerWorld.ContainsKey(worldUid)) { this.CompletedObjectivesPerWorld[worldUid] = new HashSet <string>(); } return(this.CompletedObjectivesPerWorld[worldUid].Add(objectiveTitle)); //LogLibraries.Log( "RECORD "+worldUid+", "+objectiveTitle+", this: "+this.GetHashCode()); //LogLibraries.Log( "RECORD "+string.Join(", ", this.CompletedObjectivesPerWorld.Select(kv=>kv.Key+":"+string.Join(",",kv.Value))) ); }
internal void Save(TagCompound tags) { string id = WorldIdentityLibraries.GetUniqueIdForCurrentWorld(true); tags["half_days_elapsed_" + id] = (int)this.HalfDaysElapsed; }
internal void Save() { string worldUid = WorldIdentityLibraries.GetUniqueIdForCurrentWorld(true); ModCustomDataFileLibraries.SaveAsJson(NihilismMod.Instance, worldUid, true, this.FiltersSaveCopy); }