//////////////// 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); }
//////////////// internal void Load() { string worldUid = WorldIdentityLibraries.GetUniqueIdForCurrentWorld(true); var filters = ModCustomDataFileLibraries.LoadJson <NihilismFilters>(NihilismMod.Instance, worldUid); this.FiltersSaveCopy = filters != null ? filters : this.FiltersSaveCopy; }
internal void Take(NihilismFilters data) { this.Filters.CopyFrom(data); }
//////////////// internal void Give(ref NihilismFilters data) { data = this.Filters; }
//////////////// public NihilismFiltersAccess() { this.FiltersSaveCopy = new NihilismFilters(); this.FiltersSaveCopy.ResetFiltersFromDefaults(); }