public override async Task Initialize() { IoC.Notif.ShowUnknownProgress(); IoC.Notif.ShowStatus("Loading misc data..."); DefaultAdjustments = await MiscLogic.GenerateMiscData( IoC.Archiver.LoadGameFileAsync); Adjustments = DefaultAdjustments.Clone(); RefreshControls(); }
public MiscControl() { _loading = true; IoC.Bind(Configs.LoadModuleConfig <MiscConfig>(PluginName)); MiscLogic = new MiscLogic(); InitializeComponent(); ResetSelected.Enabled = false; _loading = false; }
public override void ApplyChanges(Patch patch) { var changedValues = Adjustments.Clone(); if (Adjustments.SkipIntroLogos == DefaultAdjustments.SkipIntroLogos) { changedValues.SkipIntroLogos = null; } if (Adjustments.RemoveMenuMusic == DefaultAdjustments.RemoveMenuMusic) { changedValues.RemoveMenuMusic = null; } MiscLogic.CreatePatch(patch, Adjustments); }
public override async Task LoadPatch(string path) { await Initialize(); IoC.Notif.ShowStatus("Loading misc data..."); var newAdj = await MiscLogic.GenerateMiscData(f => IoC.Archiver.LoadFileAsync(path, f)); if (newAdj.SkipIntroLogos.HasValue) { Adjustments.SkipIntroLogos = newAdj.SkipIntroLogos; } if (newAdj.RemoveMenuMusic.HasValue) { Adjustments.RemoveMenuMusic = newAdj.RemoveMenuMusic; } RefreshControls(); }