private void RunBatchEditSaveFile(IReadOnlyCollection <StringInstructionSet> sets, bool boxes = false, bool party = false) { var data = new List <SlotCache>(); if (party) { SlotInfoLoader.AddPartyData(SAV, data); process(data); SAV.PartyData = data.ConvertAll(z => z.Entity); } if (boxes) { SlotInfoLoader.AddBoxData(SAV, data); process(data); SAV.BoxData = data.ConvertAll(z => z.Entity); } void process(IList <SlotCache> d) { SetupProgressBar(d.Count * sets.Count); foreach (var set in sets) { ProcessSAV(d, set.Filters, set.Instructions); } } }
public MirageIslandForm(SAV3 sav) { InitializeComponent(); this.sav = sav; seed = sav.GetEventConst(0x24); cache = new List <SlotCache>(sav.BoxSlotCount + (sav.HasParty ? 6 : 0)); SlotInfoLoader.AddFromSaveFile(sav, cache); MirageIslandSeedBox.Value = seed; }