예제 #1
0
        ////////////////

        internal void CopyFrom(NihilismFilters copy)
        {
            this.IsActive         = copy.IsActive;
            this.ItemBlacklist    = new HashSet <ItemDefinition>(copy.ItemBlacklist);
            this.RecipeBlacklist  = new HashSet <ItemDefinition>(copy.RecipeBlacklist);
            this.NpcBlacklist     = new HashSet <NPCDefinition>(copy.NpcBlacklist);
            this.NpcLootBlacklist = new HashSet <NPCDefinition>(copy.NpcLootBlacklist);

            this.RecipeWhitelist  = new HashSet <ItemDefinition>(copy.RecipeWhitelist);
            this.ItemWhitelist    = new HashSet <ItemDefinition>(copy.ItemWhitelist);
            this.NpcWhitelist     = new HashSet <NPCDefinition>(copy.NpcWhitelist);
            this.NpcLootWhitelist = new HashSet <NPCDefinition>(copy.NpcLootWhitelist);

            this.ItemBlacklist2    = new HashSet <ItemDefinition>(copy.ItemBlacklist2);
            this.RecipeBlacklist2  = new HashSet <ItemDefinition>(copy.RecipeBlacklist2);
            this.NpcBlacklist2     = new HashSet <NPCDefinition>(copy.NpcBlacklist2);
            this.NpcLootBlacklist2 = new HashSet <NPCDefinition>(copy.NpcLootBlacklist2);

            this.ItemGroupBlacklist    = new HashSet <string>(copy.ItemGroupBlacklist);
            this.RecipeGroupBlacklist  = new HashSet <string>(copy.RecipeGroupBlacklist);
            this.NpcGroupBlacklist     = new HashSet <string>(copy.NpcGroupBlacklist);
            this.NpcLootGroupBlacklist = new HashSet <string>(copy.NpcLootGroupBlacklist);

            this.RecipeGroupWhitelist  = new HashSet <string>(copy.RecipeGroupWhitelist);
            this.ItemGroupWhitelist    = new HashSet <string>(copy.ItemGroupWhitelist);
            this.NpcGroupWhitelist     = new HashSet <string>(copy.NpcGroupWhitelist);
            this.NpcLootGroupWhitelist = new HashSet <string>(copy.NpcLootGroupWhitelist);

            this.ItemGroupBlacklist2    = new HashSet <string>(copy.ItemGroupBlacklist2);
            this.RecipeGroupBlacklist2  = new HashSet <string>(copy.RecipeGroupBlacklist2);
            this.NpcGroupBlacklist2     = new HashSet <string>(copy.NpcGroupBlacklist2);
            this.NpcLootGroupBlacklist2 = new HashSet <string>(copy.NpcLootGroupBlacklist2);
        }
예제 #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;
        }
예제 #3
0
 internal void Take(NihilismFilters data)
 {
     this.Filters.CopyFrom(data);
 }
예제 #4
0
        ////////////////

        internal void Give(ref NihilismFilters data)
        {
            data = this.Filters;
        }
예제 #5
0
        ////////////////

        public NihilismFiltersAccess()
        {
            this.FiltersSaveCopy = new NihilismFilters();
            this.FiltersSaveCopy.ResetFiltersFromDefaults();
        }