Пример #1
0
            public GameStrings(string l)
            {
                Language = l;
                // 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");
                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];
                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();
            }