public GameStrings(string l) { lang = l; LanguageIndex = GameLanguage.GetLanguageIndex(l); ribbons = Get("ribbons"); // Past Generation strings g3items = Get("ItemsG3"); // XD and Colosseum { g3coloitems = (string[])g3items.Clone(); string[] tmp = Get("ItemsG3Colosseum"); Array.Resize(ref g3coloitems, 500 + tmp.Length); for (int i = g3items.Length; i < g3coloitems.Length; i++) { g3coloitems[i] = $"UNUSED {i}"; } tmp.CopyTo(g3coloitems, g3coloitems.Length - tmp.Length); g3xditems = (string[])g3items.Clone(); string[] tmp2 = Get("ItemsG3XD"); Array.Resize(ref g3xditems, 500 + tmp2.Length); for (int i = g3items.Length; i < g3xditems.Length; i++) { g3xditems[i] = $"UNUSED {i}"; } tmp2.CopyTo(g3xditems, g3xditems.Length - tmp2.Length); } g2items = Get("ItemsG2"); g1items = Get("ItemsG1"); metRSEFRLG_00000 = Get("rsefrlg_00000"); metGSC_00000 = Get("gsc_00000"); metCXD_00000 = Get("cxd_00000"); SanitizeMetStringsCXD(metCXD_00000); // Current Generation strings natures = Util.GetNaturesList(l); types = Get("types"); abilitylist = Get("abilities"); movelist = Get("moves"); string[] ps = { "P", "S" }; // Distinguish Physical/Special for (int i = 622; i < 658; i++) { movelist[i] += $" ({ps[i % 2]})"; } itemlist = Get("items"); characteristics = Get("character"); specieslist = Get("species"); wallpapernames = Get("wallpaper"); encountertypelist = Get("encountertype"); gamelist = Get("games"); balllist = new string[Items_Ball.Length]; for (int i = 0; i < balllist.Length; i++) { balllist[i] = itemlist[Items_Ball[i]]; } pokeblocks = Get("pokeblock"); forms = Get("forms"); memories = Get("memories"); genloc = Get("genloc"); trainingbags = Get("trainingbag"); trainingstage = Get("supertraining"); puffs = Get("puff"); walkercourses = Get("hgss_walkercourses"); uggoods = Get("dppt_uggoods"); ugspheres = Get("dppt_ugspheres"); ugtraps = Get("dppt_ugtraps"); ugtreasures = Get("dppt_ugtreasures"); EggName = specieslist[0]; metHGSS_00000 = Get("hgss_00000"); metHGSS_02000 = Get("hgss_02000"); metHGSS_03000 = Get("hgss_03000"); metBW2_00000 = Get("bw2_00000"); metBW2_30000 = Get("bw2_30000"); metBW2_40000 = Get("bw2_40000"); metBW2_60000 = Get("bw2_60000"); metXY_00000 = Get("xy_00000"); metXY_30000 = Get("xy_30000"); metXY_40000 = Get("xy_40000"); metXY_60000 = Get("xy_60000"); metSM_00000 = Get("sm_00000"); metSM_30000 = Get("sm_30000"); metSM_40000 = Get("sm_40000"); metSM_60000 = Get("sm_60000"); metGG_00000 = Get("gg_00000"); metGG_30000 = metSM_30000; metGG_40000 = Get("gg_40000"); metGG_60000 = metSM_60000; metSWSH_00000 = Get("swsh_00000"); metSWSH_30000 = Get("swsh_30000"); metSWSH_40000 = Get("swsh_40000"); metSWSH_60000 = Get("swsh_60000"); Sanitize(); g4items = (string[])itemlist.Clone(); Get("mail4").CopyTo(g4items, 137); }
public GameStrings(string l) { lang = l; ribbons = Get("ribbons"); // Past Generation strings g3items = Get("ItemsG3"); // XD and Colosseum { g3coloitems = (string[])g3items.Clone(); string[] tmp = Get("ItemsG3Colosseum"); Array.Resize(ref g3coloitems, 500 + tmp.Length); for (int i = g3items.Length; i < g3coloitems.Length; i++) { g3coloitems[i] = $"UNUSED {i}"; } tmp.CopyTo(g3coloitems, g3coloitems.Length - tmp.Length); g3xditems = (string[])g3items.Clone(); string[] tmp2 = Get("ItemsG3XD"); Array.Resize(ref g3xditems, 500 + tmp2.Length); for (int i = g3items.Length; i < g3xditems.Length; i++) { g3xditems[i] = $"UNUSED {i}"; } tmp2.CopyTo(g3xditems, g3xditems.Length - tmp2.Length); } g2items = Get("ItemsG2"); g1items = Get("ItemsG1"); metRSEFRLG_00000 = Get("rsefrlg_00000"); metGSC_00000 = Get("gsc_00000"); metCXD_00000 = Get("cxd_00000"); metCXD_00000 = SanitizeMetStringsCXD(metCXD_00000); // Current Generation strings natures = Util.GetNaturesList(l); types = Get("types"); abilitylist = Get("abilities"); movelist = Get("moves"); string[] ps = { "P", "S" }; // Distinguish Physical/Special for (int i = 622; i < 658; i++) { movelist[i] += $" ({ps[i % 2]})"; } itemlist = Get("items"); characteristics = Get("character"); specieslist = Get("species"); wallpapernames = Get("wallpaper"); encountertypelist = Get("encountertype"); gamelist = Get("games"); gamelanguages = LanguageNames; balllist = new string[Legal.Items_Ball.Length]; for (int i = 0; i < balllist.Length; i++) { balllist[i] = itemlist[Legal.Items_Ball[i]]; } pokeblocks = Get("pokeblock"); forms = Get("forms"); memories = Get("memories"); genloc = Get("genloc"); trainingbags = Get("trainingbag"); trainingstage = Get("supertraining"); puffs = Get("puff"); Array.Resize(ref puffs, puffs.Length + 1); // shift all down, 0th will be 'none' -- applied later Array.Copy(puffs, 0, puffs, 1, puffs.Length - 1); EggName = specieslist[0]; metHGSS_00000 = Get("hgss_00000"); metHGSS_02000 = Get("hgss_02000"); metHGSS_03000 = Get("hgss_03000"); metBW2_00000 = Get("bw2_00000"); metBW2_30000 = Get("bw2_30000"); metBW2_40000 = Get("bw2_40000"); metBW2_60000 = Get("bw2_60000"); metXY_00000 = Get("xy_00000"); metXY_30000 = Get("xy_30000"); metXY_40000 = Get("xy_40000"); metXY_60000 = Get("xy_60000"); metSM_00000 = Get("sm_00000"); metSM_30000 = Get("sm_30000"); metSM_40000 = Get("sm_40000"); metSM_60000 = Get("sm_60000"); metGG_00000 = Get("gg_00000"); metGG_30000 = metSM_30000; metGG_40000 = Get("gg_40000"); metGG_60000 = metSM_60000; Sanitize(); g4items = (string[])itemlist.Clone(); Get("mail4").CopyTo(g4items, 137); InitializeDataSources(); }
public GameStrings(string l) { lang = l; ribbons = Get("ribbons"); // Past Generation strings g3items = Get("ItemsG3"); // XD and Colosseum { g3coloitems = (string[])g3items.Clone(); string[] tmp = Get("ItemsG3Colosseum"); Array.Resize(ref g3coloitems, 500 + tmp.Length); for (int i = g3items.Length; i < g3coloitems.Length; i++) { g3coloitems[i] = $"UNUSED {i}"; } Array.Copy(tmp, 0, g3coloitems, g3coloitems.Length - tmp.Length, tmp.Length); g3xditems = (string[])g3items.Clone(); string[] tmp2 = Get("ItemsG3XD"); Array.Resize(ref g3xditems, 500 + tmp2.Length); for (int i = g3items.Length; i < g3xditems.Length; i++) { g3xditems[i] = $"UNUSED {i}"; } Array.Copy(tmp2, 0, g3xditems, g3xditems.Length - tmp2.Length, tmp2.Length); } g2items = Get("ItemsG2"); g1items = Get("ItemsG1"); metRSEFRLG_00000 = Get("rsefrlg_00000"); metGSC_00000 = Get("gsc_00000"); metCXD_00000 = Get("cxd_00000"); // Sanitize a little var metSanitize = (string[])metCXD_00000.Clone(); for (int i = 0; i < metSanitize.Length; i++) { if (metCXD_00000.Count(r => r == metSanitize[i]) > 1) { metSanitize[i] += $" [{i:000}]"; } } metCXD_00000 = metSanitize; // Current Generation strings natures = Util.GetNaturesList(l); types = Get("types"); abilitylist = Get("abilities"); movelist = Get("moves"); string[] ps = { "P", "S" }; // Distinguish Physical/Special for (int i = 622; i < 658; i++) { movelist[i] += $" ({ps[i%2]})"; } itemlist = Get("items"); characteristics = Get("character"); specieslist = Get("species"); wallpapernames = Get("wallpaper"); encountertypelist = Get("encountertype"); gamelist = Get("games"); gamelanguages = Util.GetNulledStringArray(Util.GetStringList("languages")); balllist = new string[Legal.Items_Ball.Length]; for (int i = 0; i < balllist.Length; i++) { balllist[i] = itemlist[Legal.Items_Ball[i]]; } pokeblocks = Get("pokeblock"); forms = Get("forms"); memories = Get("memories"); genloc = Get("genloc"); trainingbags = Get("trainingbag"); trainingstage = Get("supertraining"); puffs = Get("puff"); eggname = specieslist[0]; mail4 = Get("mail4"); metHGSS_00000 = Get("hgss_00000"); metHGSS_02000 = Get("hgss_02000"); metHGSS_03000 = Get("hgss_03000"); metBW2_00000 = Get("bw2_00000"); metBW2_30000 = Get("bw2_30000"); metBW2_40000 = Get("bw2_40000"); metBW2_60000 = Get("bw2_60000"); metXY_00000 = Get("xy_00000"); metXY_30000 = Get("xy_30000"); metXY_40000 = Get("xy_40000"); metXY_60000 = Get("xy_60000"); metSM_00000 = Get("sm_00000"); metSM_30000 = Get("sm_30000"); metSM_40000 = Get("sm_40000"); metSM_60000 = Get("sm_60000"); Sanitize(); g4items = (string[])itemlist.Clone(); for (int i = 137; i <= 148; i++) { g4items[i] = mail4[i - 137]; } }