Exemple #1
0
        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);
            }
        }
Exemple #2
0
        ////////////////

        internal void Load()
        {
            string worldUid = WorldIdentityLibraries.GetUniqueIdForCurrentWorld(true);

            var filters = ModCustomDataFileLibraries.LoadJson <NihilismFilters>(NihilismMod.Instance, worldUid);

            this.FiltersSaveCopy = filters != null
                                ? filters
                                : this.FiltersSaveCopy;
        }
Exemple #3
0
        ////////////////

        public bool IsObjectiveByNameComplete(string objectiveTitle)
        {
            string worldUid = WorldIdentityLibraries.GetUniqueIdForCurrentWorld(true);

            if (!this.CompletedObjectivesPerWorld.ContainsKey(worldUid))
            {
                return(false);
            }
            return(this.CompletedObjectivesPerWorld[worldUid].Contains(objectiveTitle));
        }
Exemple #4
0
        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))) );
        }
Exemple #5
0
        internal void Save(TagCompound tags)
        {
            string id = WorldIdentityLibraries.GetUniqueIdForCurrentWorld(true);

            tags["half_days_elapsed_" + id] = (int)this.HalfDaysElapsed;
        }
Exemple #6
0
        internal void Save()
        {
            string worldUid = WorldIdentityLibraries.GetUniqueIdForCurrentWorld(true);

            ModCustomDataFileLibraries.SaveAsJson(NihilismMod.Instance, worldUid, true, this.FiltersSaveCopy);
        }