Exemplo n.º 1
0
        private void button12_Click(object sender, EventArgs e)
        {
            ChangeLabel(1);
            EditItems.Clear();
            AddItems.Clear();
            if (!System.IO.Directory.Exists(@"Input"))
            {
                System.IO.Directory.CreateDirectory("Input");
            }
            if (!System.IO.File.Exists(@"Input\Blizzard.j"))
            {
                System.IO.File.Copy(@"Original\Blizzard.j", @"Input\Blizzard.j");
            }
            BJ = new Bj_structure(@"Input\Blizzard.j");
            MultiRace mc = new MultiRace();

            frm2.ShowDialog();
            if (((Form2)this.OwnedForms[0]).isjustload == false)
            {
                mc.GenerateConstants(((Form2)this.OwnedForms[0]).race);
                mc.AddConstants(ref BJ);

                mc.AddCommentToBottom(ref BJ, "Mod Craft Initialization");
                mc.ModifyStartingUnits(ref BJ, ((Form2)this.OwnedForms[0]).raceinfo_list, true);
                mc.ModifyMeleeAI(ref BJ, ((Form2)this.OwnedForms[0]).raceinfo_list, true);

                mc.MoveFunctionsToButtom(ref BJ, "MeleeStartingVisibility");
                mc.MoveFunctionsToButtom(ref BJ, "MeleeStartingUnits");
                mc.MoveFunctionsToButtom(ref BJ, "MeleeStartingUnitsForPlayer");
                mc.MoveFunctionsToButtom(ref BJ, "MeleeStartingAI");
                mc.MoveFunctionsToButtom(ref BJ, "MeleeStartingHeroLimit");

                mc.AddSyncFuncs(ref BJ, false);
            }
            ListBJNew();
            ChangeLabel(0);
        }
Exemplo n.º 2
0
        private void button12_Click(object sender, EventArgs e)
        {
            ChangeLabel(1);
            EditItems.Clear();
            AddItems.Clear();
            if (!System.IO.Directory.Exists(@"Input")) { System.IO.Directory.CreateDirectory("Input"); }
            if (!System.IO.File.Exists(@"Input\Blizzard.j")) { System.IO.File.Copy(@"Original\Blizzard.j", @"Input\Blizzard.j"); }
            BJ = new Bj_structure(@"Input\Blizzard.j");
            MultiRace mc = new MultiRace();
            frm2.ShowDialog();
            if (((Form2)this.OwnedForms[0]).isjustload==false)
            {
                mc.GenerateConstants(((Form2)this.OwnedForms[0]).race);
                mc.AddConstants(ref BJ);

                mc.AddCommentToBottom(ref BJ, "Mod Craft Initialization");
                mc.ModifyStartingUnits(ref BJ, ((Form2)this.OwnedForms[0]).raceinfo_list, true);
                mc.ModifyMeleeAI(ref BJ, ((Form2)this.OwnedForms[0]).raceinfo_list, true);

                mc.MoveFunctionsToButtom(ref BJ, "MeleeStartingVisibility");
                mc.MoveFunctionsToButtom(ref BJ, "MeleeStartingUnits");
                mc.MoveFunctionsToButtom(ref BJ, "MeleeStartingUnitsForPlayer");
                mc.MoveFunctionsToButtom(ref BJ, "MeleeStartingAI");
                mc.MoveFunctionsToButtom(ref BJ, "MeleeStartingHeroLimit");

                mc.AddSyncFuncs(ref BJ, false);
            }
            ListBJNew();
            ChangeLabel(0);
        }