public override async Task Initialize() { ResetSelected.Enabled = false; IoC.Notif.ShowUnknownProgress(); IoC.Notif.ShowStatus("Loading outfit list..."); DefaultOutfits = (await OutfitGen.GenerateOutfits( IoC.Archiver.LoadGameFileAsync)).ToHashSet(); //some outfits, like undergarments, are never used in game by the player and only create problems if switched var ignored = IoC.Get <OutfitConfig>().IgnoredOutfits.ToHashSet(); Outfits = DefaultOutfits .Where(x => !ignored.Contains(x.Name)) .Select(x => x.Clone()).OrderBy(x => x.DisplayName) .ToList().AsReadOnly(); PopulateOutfitsList(); await UpdateModelList(); UpdateAllOutfitsSelection(); //start loading characters in background Async.Run(() => CharacterGen.GetCharacterModels(true)).Forget(); }
public override async Task LoadPatch(string path) { IoC.Notif.ShowStatus("Loading outfits..."); var patchOutfits = await OutfitGen.GenerateOutfits(f => IoC.Archiver.LoadFileAsync(path, f)); if (!patchOutfits.Any()) { return; } await Initialize(); var loadedOutfits = patchOutfits.ToHashSet(); var variantMapping = await CharacterGen.GetVariantMapping(path, OutfitGen); LoadOutfits(loadedOutfits, variantMapping); RefreshOutfitList(); }