private IEnumerable <Model> LoadCharacterModelList(bool all) { IoC.Notif.ShowStatus("Loading characters list..."); var models = CharacterGen.GetCharacterModels(all); return(models.OrderBy(x => x.ToString().Contains("DLC") ? 1 : 0).ThenBy(x => x.ToString())); }
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 void ApplyChanges(Patch patch) { var models = OutfitGen.GenerateModelList(IoC.Archiver.LoadGameFile); models.AddRange(CharacterGen.GetCharacterModels(true)); Patcher.CreatePatch(patch, DefaultOutfits.ToList(), Outfits, models); }