public GGWE(GameManager rom, EncounterArchive7b obj) { InitializeComponent(); if (obj.EncounterTables.Length == 0 || obj.EncounterTables[0].GroundTable.Length == 0) { WinFormsUtil.Error("Bad data provided.", $"Unable to parse to {nameof(EncounterArchive7b)} data."); Close(); } ROM = rom; var spec = rom.GetStrings(TextName.SpeciesNames); var species = (string[])spec.Clone(); species[0] = ""; EncounterList.species = species; var locs = rom.GetStrings(TextName.metlist_00000); EL_Ground.Initialize(); EL_Water.Initialize(); EL_Old.Initialize(); EL_Good.Initialize(); EL_Super.Initialize(); EL_Sky.Initialize(); TC_Tables.Controls.Remove(Tab_Old); TC_Tables.Controls.Remove(Tab_Good); TC_Tables.Controls.Remove(Tab_Super); EL_Old.OverworldSpawn = EL_Good.OverworldSpawn = EL_Super.OverworldSpawn = false; L_Rank.Visible = NUD_RankMin.Visible = NUD_RankMax.Visible = false; PG_Species.SelectedObject = EditUtil.Settings.Species; Tables = obj; LoadFile(locs); EL_Ground.ShowForm = false; EL_Water.ShowForm = false; EL_Old.ShowForm = false; EL_Good.ShowForm = false; EL_Super.ShowForm = false; EL_Sky.ShowForm = false; CB_Location.SelectedIndex = 0; }
private static IEnumerable <string> GetEncounterTableSummary(GameManager rom, EncounterArchive7b table) { var locationNames = rom.GetStrings(TextName.metlist_00000); var specs = rom.GetStrings(TextName.SpeciesNames); var locs = table.EncounterTables.Select(z => z.ZoneID); var names = GetNames(locs, locationNames); var dupeNamed = GetScreenedNames(names).ToArray(); return(EncounterTable7bUtil.GetLines(table, dupeNamed, specs)); }