Пример #1
0
        private void addToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ObjectParameters op = new ObjectParameters("ScenarioArchiveName");

            WarpEdit we = new WarpEdit();

            we.tableName = "BinEditorGenerated" + Tables.Length;
            we.tableList = new string[0];
            if (we.ShowDialog() != DialogResult.OK)
            {
                return;
            }

            GameObject table = new GameObject("ScenarioArchiveNameTable", we.tableName, 0);

            stageArc.Objects[0].Grouped[0].Grouped.Add(table);
            table.Parent = stageArc.Objects[0].Grouped[0];

            table.Grouped = new List <GameObject>();
            for (int i = 0; i < we.tableList.Length; i++)
            {
                GameObject go = new GameObject("ScenarioArchiveName", we.tableName + " " + i, 2);
                op.Adjust(go);
                op.SetParamValue(0, go, we.tableList[i]);
                table.Grouped.Add(go);
                go.Parent = table;
            }

            stageArc.Save(arc);

            LoadInfo();
        }
Пример #2
0
        private void editToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ObjectParameters op = new ObjectParameters("ScenarioArchiveName");

            WarpEdit we = new WarpEdit();

            we.tableName = Tables[listBox1.SelectedIndex].Description;
            we.tableList = levels[listBox1.SelectedIndex];
            if (we.ShowDialog() != DialogResult.OK)
            {
                return;
            }

            levels[listBox1.SelectedIndex] = we.tableList;

            Tables[listBox1.SelectedIndex].Description = we.tableName;
            Tables[listBox1.SelectedIndex].DescHash    = GCN.CreateHash(we.tableName);
            Tables[listBox1.SelectedIndex].Grouped.Clear();
            for (int i = 0; i < we.tableList.Length; i++)
            {
                GameObject go = new GameObject("ScenarioArchiveName", we.tableName + " " + i, 2);
                op.Adjust(go);
                op.SetParamValue(0, go, we.tableList[i]);
                Tables[listBox1.SelectedIndex].Grouped.Add(go);
                go.Parent = Tables[listBox1.SelectedIndex];
            }

            stageArc.Save(arc);
        }