Project Settings:

- Cleaned up the code within the editor.

Realm Explorer:
 - Some UI adjustments.

Room Designer:
 - Program.Room is no longer re-instanced after the room designer saves a room.

Toolkit Launcher:
 - Zone and Room edior buttons removed. They can now only be accessed via the Realm Explorer.
 - Changed the Toolkit Title.

Zone Builder:
 - Began Room Doorway linking UI design.

Mud Engine:
 - Zones now instance the Rooms collection.
 - Travel Directions now moved from Environment namespace and placed within Objects namespace.
 - Travel Directions now contains a class and method for returning the opposite direction provided. (ex: GetReverseDirection(TravelDirections.West) returns East).
This commit is contained in:
Scionwest_cp 2009-12-06 00:13:43 -08:00
parent f2a90ecb3f
commit 4ebce0a987
13 changed files with 430 additions and 238 deletions

View file

@ -31,113 +31,50 @@ namespace MudDesigner.Editors
private void frmMain_Load(object sender, EventArgs e) private void frmMain_Load(object sender, EventArgs e)
{ {
//Get all of the realms currently created.
string[] files = System.IO.Directory.GetFiles(FileManager.GetDataPath(SaveDataTypes.Realms), "*.realm");
//Aquire the Project settings and show them. //Aquire the Project settings and show them.
propertyGrid1.SelectedObject = Program.Project; propertyGrid1.SelectedObject = Program.Project;
txtStory.Text = Program.Project.Story; txtStory.Text = Program.Project.Story;
//Add each realm found into the combo box of available realms. string realmPath = FileManager.GetDataPath(SaveDataTypes.Realms);
foreach (string realm in files) string[] realms = System.IO.Directory.GetFiles(realmPath, "*.realm");
foreach (string file in realms)
{ {
//Instance a new realm Realm realm = new Realm();
Realm newRealm = new Realm(); realm = (Realm)FileManager.Load(file, realm);
//De-serialize the current realm. comRealms.Items.Add(realm.Name);
newRealm = (Realm)FileManager.Load(realm, newRealm);
//Add it to the available realms combo box.
comRealms.Items.Add(newRealm.Name);
} }
//If the Project already has a starting realm, then select it. if (comRealms.Items.Count != 0)
if (Program.Project.InitialLocation.Realm != null)
{
comRealms.SelectedIndex = comRealms.Items.IndexOf(Program.Project.InitialLocation.Realm.Name);
}
//If there is no starting realm, but a realm does exist, select the first one in the list.
else if (comRealms.Items.Count != 0)
{
comRealms.SelectedIndex = 0; comRealms.SelectedIndex = 0;
} }
}//End frmMain_Load
private void comRealms_SelectedIndexChanged(object sender, EventArgs e) private void comRealms_SelectedIndexChanged(object sender, EventArgs e)
{ {
lstZones.Items.Clear(); if (comRealms.SelectedIndex == -1)
//Check if we have any realms first.
if (comRealms.Items.Count == 0)
return; return;
string[] files = System.IO.Directory.GetFiles(Application.StartupPath + @"\Data\Zones"); string realmPath = FileManager.GetDataPath(SaveDataTypes.Realms);
string realmFile = System.IO.Path.Combine(realmPath, comRealms.SelectedItem.ToString() + ".realm");
//Add each zone found into the list box. Realm realm = new Realm();
foreach (string zone in files) realm = (Realm)FileManager.Load(realmFile, realm);
foreach (Zone zone in realm.Zones)
{ {
Zone newZone = new Zone(); lstZones.Items.Add(zone.Name);
//De-serialize the current zone.
newZone = (Zone)FileManager.Load(zone, newZone);
//Add it to the available zones list box
lstZones.Items.Add(newZone.Name);
zones.Add(newZone);
} }
}
//Check if we have an existing realm that's set as our startup.
if (Program.Project.InitialLocation.Realm != null)
{
//Check if we have the Initial realm selected, if so we need to check the initial Zone as well
if (comRealms.SelectedItem.ToString() == Program.Project.InitialLocation.Realm.Name)
{
//We have an initial zone, so lets check it in the list box
if (Program.Project.InitialLocation.Zone != null)
{
if (lstZones.Items.Contains(Program.Project.InitialLocation.Zone.Name))
{
lstZones.SelectedIndex = lstZones.Items.IndexOf(Program.Project.InitialLocation.Zone.Name);
}
}
}
}
}//End comRealms
private void lstZones_SelectedIndexChanged(object sender, EventArgs e) private void lstZones_SelectedIndexChanged(object sender, EventArgs e)
{ {
string realm = comRealms.SelectedItem.ToString(); if (lstZones.SelectedIndex == -1)
string zone = lstZones.SelectedItem.ToString();
lstRooms.Items.Clear();
//Check if we have any realms first.
if (comRealms.Items.Count == 0)
return; return;
string[] files = System.IO.Directory.GetFiles(Application.StartupPath + @"\Data\Rooms"); string zonePath = FileManager.GetDataPath(SaveDataTypes.Zones);
string zoneFile = System.IO.Path.Combine(zonePath, lstZones.SelectedItem.ToString() + ".zone");
//Add each room found into the list box. Zone zone = new Zone();
foreach (string room in files) zone = (Zone)FileManager.Load(zoneFile, zone);
foreach (Room room in zone.Rooms)
{ {
Room newRoom = new Room(); lstRooms.Items.Add(room.Name);
//De-serialize the current Room.
newRoom = (Room)FileManager.Load(room, newRoom);
//Add it to the available rooms list box
lstRooms.Items.Add(newRoom.Name);
rooms.Add(newRoom);
}
//Now select the initial room if its listed.
string selectedRealm = comRealms.SelectedItem.ToString();
string selectedZone = lstZones.SelectedItem.ToString();
string initialRealm = Program.Project.InitialLocation.Realm.Name;
string initialZone = Program.Project.InitialLocation.Zone.Name;
//The realm and zone that matches the initial are selected, so lets select the initial room next.
if ((initialRealm == selectedRealm) && (initialZone == selectedZone))
{
foreach (Room room in rooms)
{
if (lstRooms.Items.Contains(room.Name))
lstRooms.SelectedIndex = lstRooms.Items.IndexOf(room.Name);
}
} }
} }
@ -151,5 +88,25 @@ namespace MudDesigner.Editors
string filename = System.IO.Path.Combine(FileManager.GetDataPath(SaveDataTypes.Root), "Project.xml"); string filename = System.IO.Path.Combine(FileManager.GetDataPath(SaveDataTypes.Root), "Project.xml");
FileManager.Save(filename, Program.Project); FileManager.Save(filename, Program.Project);
} }
private void lstRooms_SelectedIndexChanged(object sender, EventArgs e)
{
string roomPath = FileManager.GetDataPath(SaveDataTypes.Rooms);
string zonePath = FileManager.GetDataPath(SaveDataTypes.Zones);
string realmPath = FileManager.GetDataPath(SaveDataTypes.Realms);
string roomFile = System.IO.Path.Combine(roomPath, lstRooms.SelectedItem.ToString() + ".room");
string zoneFile = System.IO.Path.Combine(zonePath, lstZones.SelectedItem.ToString() + ".zone");
string realmFile = System.IO.Path.Combine(realmPath, comRealms.SelectedItem.ToString() + ".realm");
Room room = new Room();
Zone zone = new Zone();
Realm realm = new Realm();
room = (Room)FileManager.Load(roomFile, room);
zone = (Zone)FileManager.Load(zoneFile, zone);
realm = (Realm)FileManager.Load(realmFile, realm);
//TODO: Fix broken InitialLocation
}
} }
} }

View file

@ -34,11 +34,11 @@
this.txtStory = new System.Windows.Forms.RichTextBox(); this.txtStory = new System.Windows.Forms.RichTextBox();
this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox1 = new System.Windows.Forms.GroupBox();
this.groupBox4 = new System.Windows.Forms.GroupBox(); this.groupBox4 = new System.Windows.Forms.GroupBox();
this.lstRooms = new System.Windows.Forms.CheckedListBox();
this.groupBox3 = new System.Windows.Forms.GroupBox(); this.groupBox3 = new System.Windows.Forms.GroupBox();
this.lstZones = new System.Windows.Forms.CheckedListBox();
this.groupBox2 = new System.Windows.Forms.GroupBox(); this.groupBox2 = new System.Windows.Forms.GroupBox();
this.comRealms = new System.Windows.Forms.ComboBox(); this.comRealms = new System.Windows.Forms.ComboBox();
this.lstZones = new System.Windows.Forms.ListBox();
this.lstRooms = new System.Windows.Forms.ListBox();
this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout(); this.splitContainer1.SuspendLayout();
@ -117,16 +117,6 @@
this.groupBox4.TabStop = false; this.groupBox4.TabStop = false;
this.groupBox4.Text = "Available Rooms"; this.groupBox4.Text = "Available Rooms";
// //
// lstRooms
//
this.lstRooms.Dock = System.Windows.Forms.DockStyle.Fill;
this.lstRooms.FormattingEnabled = true;
this.lstRooms.Location = new System.Drawing.Point(3, 16);
this.lstRooms.Name = "lstRooms";
this.lstRooms.Size = new System.Drawing.Size(143, 154);
this.lstRooms.TabIndex = 1;
this.lstRooms.ThreeDCheckBoxes = true;
//
// groupBox3 // groupBox3
// //
this.groupBox3.Controls.Add(this.lstZones); this.groupBox3.Controls.Add(this.lstZones);
@ -137,17 +127,6 @@
this.groupBox3.TabStop = false; this.groupBox3.TabStop = false;
this.groupBox3.Text = "Available Zones"; this.groupBox3.Text = "Available Zones";
// //
// lstZones
//
this.lstZones.Dock = System.Windows.Forms.DockStyle.Fill;
this.lstZones.FormattingEnabled = true;
this.lstZones.Location = new System.Drawing.Point(3, 16);
this.lstZones.Name = "lstZones";
this.lstZones.Size = new System.Drawing.Size(143, 109);
this.lstZones.TabIndex = 0;
this.lstZones.ThreeDCheckBoxes = true;
this.lstZones.SelectedIndexChanged += new System.EventHandler(this.lstZones_SelectedIndexChanged);
//
// groupBox2 // groupBox2
// //
this.groupBox2.Controls.Add(this.comRealms); this.groupBox2.Controls.Add(this.comRealms);
@ -170,6 +149,26 @@
this.comRealms.TabIndex = 0; this.comRealms.TabIndex = 0;
this.comRealms.SelectedIndexChanged += new System.EventHandler(this.comRealms_SelectedIndexChanged); this.comRealms.SelectedIndexChanged += new System.EventHandler(this.comRealms_SelectedIndexChanged);
// //
// lstZones
//
this.lstZones.Dock = System.Windows.Forms.DockStyle.Fill;
this.lstZones.FormattingEnabled = true;
this.lstZones.Location = new System.Drawing.Point(3, 16);
this.lstZones.Name = "lstZones";
this.lstZones.Size = new System.Drawing.Size(143, 108);
this.lstZones.TabIndex = 0;
this.lstZones.SelectedIndexChanged += new System.EventHandler(this.lstZones_SelectedIndexChanged);
//
// lstRooms
//
this.lstRooms.Dock = System.Windows.Forms.DockStyle.Fill;
this.lstRooms.FormattingEnabled = true;
this.lstRooms.Location = new System.Drawing.Point(3, 16);
this.lstRooms.Name = "lstRooms";
this.lstRooms.Size = new System.Drawing.Size(143, 160);
this.lstRooms.TabIndex = 1;
this.lstRooms.SelectedIndexChanged += new System.EventHandler(this.lstRooms_SelectedIndexChanged);
//
// ProjectSettings // ProjectSettings
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@ -205,10 +204,10 @@
private System.Windows.Forms.ComboBox comRealms; private System.Windows.Forms.ComboBox comRealms;
private System.Windows.Forms.GroupBox groupBox3; private System.Windows.Forms.GroupBox groupBox3;
private System.Windows.Forms.GroupBox groupBox4; private System.Windows.Forms.GroupBox groupBox4;
private System.Windows.Forms.CheckedListBox lstRooms;
private System.Windows.Forms.CheckedListBox lstZones;
private System.Windows.Forms.GroupBox groupBox5; private System.Windows.Forms.GroupBox groupBox5;
private System.Windows.Forms.RichTextBox txtStory; private System.Windows.Forms.RichTextBox txtStory;
private System.Windows.Forms.ListBox lstZones;
private System.Windows.Forms.ListBox lstRooms;
} }
} }

View file

@ -80,8 +80,8 @@
// splitContainer1.Panel2 // splitContainer1.Panel2
// //
this.splitContainer1.Panel2.Controls.Add(this.groupBox1); this.splitContainer1.Panel2.Controls.Add(this.groupBox1);
this.splitContainer1.Size = new System.Drawing.Size(529, 488); this.splitContainer1.Size = new System.Drawing.Size(536, 488);
this.splitContainer1.SplitterDistance = 193; this.splitContainer1.SplitterDistance = 208;
this.splitContainer1.TabIndex = 0; this.splitContainer1.TabIndex = 0;
// //
// splitContainer2 // splitContainer2
@ -98,7 +98,7 @@
// splitContainer2.Panel2 // splitContainer2.Panel2
// //
this.splitContainer2.Panel2.Controls.Add(this.propertyRealm); this.splitContainer2.Panel2.Controls.Add(this.propertyRealm);
this.splitContainer2.Size = new System.Drawing.Size(193, 488); this.splitContainer2.Size = new System.Drawing.Size(208, 488);
this.splitContainer2.SplitterDistance = 220; this.splitContainer2.SplitterDistance = 220;
this.splitContainer2.TabIndex = 0; this.splitContainer2.TabIndex = 0;
// //
@ -108,7 +108,7 @@
this.lstRealms.FormattingEnabled = true; this.lstRealms.FormattingEnabled = true;
this.lstRealms.Location = new System.Drawing.Point(0, 0); this.lstRealms.Location = new System.Drawing.Point(0, 0);
this.lstRealms.Name = "lstRealms"; this.lstRealms.Name = "lstRealms";
this.lstRealms.Size = new System.Drawing.Size(193, 212); this.lstRealms.Size = new System.Drawing.Size(208, 212);
this.lstRealms.Sorted = true; this.lstRealms.Sorted = true;
this.lstRealms.TabIndex = 0; this.lstRealms.TabIndex = 0;
this.lstRealms.SelectedIndexChanged += new System.EventHandler(this.lstRealms_SelectedIndexChanged); this.lstRealms.SelectedIndexChanged += new System.EventHandler(this.lstRealms_SelectedIndexChanged);
@ -118,7 +118,7 @@
this.propertyRealm.Dock = System.Windows.Forms.DockStyle.Fill; this.propertyRealm.Dock = System.Windows.Forms.DockStyle.Fill;
this.propertyRealm.Location = new System.Drawing.Point(0, 0); this.propertyRealm.Location = new System.Drawing.Point(0, 0);
this.propertyRealm.Name = "propertyRealm"; this.propertyRealm.Name = "propertyRealm";
this.propertyRealm.Size = new System.Drawing.Size(193, 264); this.propertyRealm.Size = new System.Drawing.Size(208, 264);
this.propertyRealm.TabIndex = 0; this.propertyRealm.TabIndex = 0;
this.propertyRealm.ToolbarVisible = false; this.propertyRealm.ToolbarVisible = false;
// //
@ -191,7 +191,7 @@
// //
// btnUnselectZone // btnUnselectZone
// //
this.btnUnselectZone.Location = new System.Drawing.Point(211, 175); this.btnUnselectZone.Location = new System.Drawing.Point(214, 175);
this.btnUnselectZone.Name = "btnUnselectZone"; this.btnUnselectZone.Name = "btnUnselectZone";
this.btnUnselectZone.Size = new System.Drawing.Size(95, 23); this.btnUnselectZone.Size = new System.Drawing.Size(95, 23);
this.btnUnselectZone.TabIndex = 15; this.btnUnselectZone.TabIndex = 15;
@ -255,7 +255,7 @@
// //
// btnClose // btnClose
// //
this.btnClose.Location = new System.Drawing.Point(197, 48); this.btnClose.Location = new System.Drawing.Point(200, 47);
this.btnClose.Name = "btnClose"; this.btnClose.Name = "btnClose";
this.btnClose.Size = new System.Drawing.Size(109, 23); this.btnClose.Size = new System.Drawing.Size(109, 23);
this.btnClose.TabIndex = 11; this.btnClose.TabIndex = 11;
@ -265,7 +265,7 @@
// //
// btnSaveRealm // btnSaveRealm
// //
this.btnSaveRealm.Location = new System.Drawing.Point(197, 19); this.btnSaveRealm.Location = new System.Drawing.Point(200, 19);
this.btnSaveRealm.Name = "btnSaveRealm"; this.btnSaveRealm.Name = "btnSaveRealm";
this.btnSaveRealm.Size = new System.Drawing.Size(109, 23); this.btnSaveRealm.Size = new System.Drawing.Size(109, 23);
this.btnSaveRealm.TabIndex = 10; this.btnSaveRealm.TabIndex = 10;
@ -330,7 +330,7 @@
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(529, 488); this.ClientSize = new System.Drawing.Size(536, 488);
this.Controls.Add(this.splitContainer1); this.Controls.Add(this.splitContainer1);
this.Name = "RealmExplorer"; this.Name = "RealmExplorer";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;

View file

@ -291,7 +291,6 @@ namespace MudDesigner.Editors
string zonePath = FileManager.GetDataPath(SaveDataTypes.Zones); string zonePath = FileManager.GetDataPath(SaveDataTypes.Zones);
string zoneFile = System.IO.Path.Combine(zonePath, Program.Zone.Filename); string zoneFile = System.IO.Path.Combine(zonePath, Program.Zone.Filename);
FileManager.Save(zoneFile, Program.Zone); FileManager.Save(zoneFile, Program.Zone);
Program.Room = new Room();
this.Close(); this.Close();
} }

View file

@ -19,10 +19,7 @@ namespace MudDesigner.Editors
public ToolkitLauncher() public ToolkitLauncher()
{ {
InitializeComponent(); InitializeComponent();
this.Text = "Mud Designer Beta " + version; this.Text = "Mud Designer Preview Release " + version;
MessageBox.Show("Please note that the Zone Builder and Room Designers will be removed from this editor as a point of access here pretty soon.\n"
+ "If you need to access one of these editors you will need to use the Realm Explorer.", "Mud Designer");
} }
private void btnProjectSettings_Click(object sender, EventArgs e) private void btnProjectSettings_Click(object sender, EventArgs e)
@ -55,21 +52,6 @@ namespace MudDesigner.Editors
this.Show(); this.Show();
} }
private void btnRoomDesigner_Click(object sender, EventArgs e)
{
RoomDesigner form = new RoomDesigner();
Program.CurrentEditor = form;
form.Show();
this.Hide();
while (form.Created)
Application.DoEvents();
form = null;
this.Show();
}
private void btnRealmExplorer_Click(object sender, EventArgs e) private void btnRealmExplorer_Click(object sender, EventArgs e)
{ {
RealmExplorer form = new RealmExplorer(); RealmExplorer form = new RealmExplorer();
@ -84,20 +66,5 @@ namespace MudDesigner.Editors
this.Show(); this.Show();
} }
private void btnZoneBuilder_Click(object sender, EventArgs e)
{
ZoneBuilder form = new ZoneBuilder();
Program.CurrentEditor = form;
form.Show();
this.Hide();
while (form.Created)
Application.DoEvents();
form = null;
this.Show();
}
} }
} }

View file

@ -36,8 +36,6 @@
this.btnProjectSettings = new System.Windows.Forms.Button(); this.btnProjectSettings = new System.Windows.Forms.Button();
this.btnCurrencyEditor = new System.Windows.Forms.Button(); this.btnCurrencyEditor = new System.Windows.Forms.Button();
this.btnRealmExplorer = new System.Windows.Forms.Button(); this.btnRealmExplorer = new System.Windows.Forms.Button();
this.btnZoneBuilder = new System.Windows.Forms.Button();
this.btnRoomDesigner = new System.Windows.Forms.Button();
this.tabFunctions = new System.Windows.Forms.TabPage(); this.tabFunctions = new System.Windows.Forms.TabPage();
this.groupBox9 = new System.Windows.Forms.GroupBox(); this.groupBox9 = new System.Windows.Forms.GroupBox();
this.groupBox14 = new System.Windows.Forms.GroupBox(); this.groupBox14 = new System.Windows.Forms.GroupBox();
@ -98,7 +96,7 @@
this.btnLogo.Name = "btnLogo"; this.btnLogo.Name = "btnLogo";
this.btnLogo.Size = new System.Drawing.Size(639, 154); this.btnLogo.Size = new System.Drawing.Size(639, 154);
this.btnLogo.TabIndex = 0; this.btnLogo.TabIndex = 0;
this.btnLogo.Text = "MUD Designer HUB \r\nBeta 1.0\r\n"; this.btnLogo.Text = "MUD Designer HUB \r\nPreview Release 1\r\n";
this.btnLogo.UseVisualStyleBackColor = false; this.btnLogo.UseVisualStyleBackColor = false;
// //
// tabEditors // tabEditors
@ -127,8 +125,6 @@
this.flowLayoutPanel1.Controls.Add(this.btnProjectSettings); this.flowLayoutPanel1.Controls.Add(this.btnProjectSettings);
this.flowLayoutPanel1.Controls.Add(this.btnCurrencyEditor); this.flowLayoutPanel1.Controls.Add(this.btnCurrencyEditor);
this.flowLayoutPanel1.Controls.Add(this.btnRealmExplorer); this.flowLayoutPanel1.Controls.Add(this.btnRealmExplorer);
this.flowLayoutPanel1.Controls.Add(this.btnZoneBuilder);
this.flowLayoutPanel1.Controls.Add(this.btnRoomDesigner);
this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.flowLayoutPanel1.Location = new System.Drawing.Point(3, 3); this.flowLayoutPanel1.Location = new System.Drawing.Point(3, 3);
this.flowLayoutPanel1.Name = "flowLayoutPanel1"; this.flowLayoutPanel1.Name = "flowLayoutPanel1";
@ -171,30 +167,6 @@
this.btnRealmExplorer.UseVisualStyleBackColor = true; this.btnRealmExplorer.UseVisualStyleBackColor = true;
this.btnRealmExplorer.Click += new System.EventHandler(this.btnRealmExplorer_Click); this.btnRealmExplorer.Click += new System.EventHandler(this.btnRealmExplorer_Click);
// //
// btnZoneBuilder
//
this.btnZoneBuilder.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnZoneBuilder.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnZoneBuilder.Location = new System.Drawing.Point(462, 3);
this.btnZoneBuilder.Name = "btnZoneBuilder";
this.btnZoneBuilder.Size = new System.Drawing.Size(147, 55);
this.btnZoneBuilder.TabIndex = 4;
this.btnZoneBuilder.Text = "Zone Builder";
this.btnZoneBuilder.UseVisualStyleBackColor = true;
this.btnZoneBuilder.Click += new System.EventHandler(this.btnZoneBuilder_Click);
//
// btnRoomDesigner
//
this.btnRoomDesigner.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnRoomDesigner.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnRoomDesigner.Location = new System.Drawing.Point(3, 64);
this.btnRoomDesigner.Name = "btnRoomDesigner";
this.btnRoomDesigner.Size = new System.Drawing.Size(147, 55);
this.btnRoomDesigner.TabIndex = 5;
this.btnRoomDesigner.Text = "Room Designer";
this.btnRoomDesigner.UseVisualStyleBackColor = true;
this.btnRoomDesigner.Click += new System.EventHandler(this.btnRoomDesigner_Click);
//
// tabFunctions // tabFunctions
// //
this.tabFunctions.Controls.Add(this.groupBox9); this.tabFunctions.Controls.Add(this.groupBox9);
@ -379,8 +351,6 @@
private System.Windows.Forms.RichTextBox txtScript; private System.Windows.Forms.RichTextBox txtScript;
private System.Windows.Forms.TabPage tabVariables; private System.Windows.Forms.TabPage tabVariables;
private System.Windows.Forms.Button btnRealmExplorer; private System.Windows.Forms.Button btnRealmExplorer;
private System.Windows.Forms.Button btnZoneBuilder;
private System.Windows.Forms.Button btnRoomDesigner;
} }
} }

View file

@ -24,6 +24,12 @@ namespace MudDesigner.Editors
public ZoneBuilder() public ZoneBuilder()
{ {
InitializeComponent(); InitializeComponent();
string realmPath = FileManager.GetDataPath(SaveDataTypes.Realms);
string[] realms = System.IO.Directory.GetFiles(realmPath, "*.realm");
comRealms.DataSource = realms;
if (comRealms.Items.Count != 0)
comRealms.SelectedIndex = comRealms.Items.IndexOf(Program.Zone.Realm);
} }
private void btnRoomEditor_Click(object sender, EventArgs e) private void btnRoomEditor_Click(object sender, EventArgs e)
@ -45,6 +51,7 @@ namespace MudDesigner.Editors
form = null; form = null;
this.Show(); this.Show();
propertyRoom.SelectedObject = Program.Room;
} }
private void btnSaveZone_Click(object sender, EventArgs e) private void btnSaveZone_Click(object sender, EventArgs e)
@ -139,13 +146,39 @@ namespace MudDesigner.Editors
private void lstRooms_SelectedIndexChanged(object sender, EventArgs e) private void lstRooms_SelectedIndexChanged(object sender, EventArgs e)
{ {
if (lstRooms.SelectedIndex == -1)
return;
btnRoomEditor.Text = "Edit Selected Room"; btnRoomEditor.Text = "Edit Selected Room";
string roomPath = FileManager.GetDataPath(SaveDataTypes.Rooms);
string roomFile = System.IO.Path.Combine(roomPath, lstRooms.SelectedItem.ToString() + ".room");
Program.Room = (Room)FileManager.Load(roomFile, Program.Room);
//propertyRoom.Enabled = true;
propertyRoom.SelectedObject = Program.Room;
} }
private void btnUnselectRoom_Click(object sender, EventArgs e) private void btnUnselectRoom_Click(object sender, EventArgs e)
{ {
lstRooms.SelectedIndex = -1; lstRooms.SelectedIndex = -1;
btnRoomEditor.Text = "Build A Room"; btnRoomEditor.Text = "Build A Room";
Program.Room = new Room();
propertyRoom.SelectedObject = null;
}
private void btnCurrentRealm_Click(object sender, EventArgs e)
{
comRealms.SelectedIndex = comRealms.Items.IndexOf(Program.Zone.Realm);
}
private void comRealms_SelectedIndexChanged(object sender, EventArgs e)
{
if (comRealms.SelectedIndex == -1)
return;
string zonePath = FileManager.GetDataPath(SaveDataTypes.Zones);
string[] zones = System.IO.Directory.GetFiles(zonePath, "*.zone");
lstZonesInRealm.DataSource = zones;
} }
} }
} }

View file

@ -40,9 +40,27 @@
this.txtScript = new System.Windows.Forms.RichTextBox(); this.txtScript = new System.Windows.Forms.RichTextBox();
this.btnValidateScript = new System.Windows.Forms.Button(); this.btnValidateScript = new System.Windows.Forms.Button();
this.groupBox2 = new System.Windows.Forms.GroupBox(); this.groupBox2 = new System.Windows.Forms.GroupBox();
this.lstRooms = new System.Windows.Forms.ListBox();
this.btnUnselectRoom = new System.Windows.Forms.Button(); this.btnUnselectRoom = new System.Windows.Forms.Button();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.btnRoomEditor = new System.Windows.Forms.Button(); this.btnRoomEditor = new System.Windows.Forms.Button();
this.lstRooms = new System.Windows.Forms.ListBox();
this.groupBox4 = new System.Windows.Forms.GroupBox();
this.propertyRoom = new System.Windows.Forms.PropertyGrid();
this.btnNorth = new System.Windows.Forms.Button();
this.btnWest = new System.Windows.Forms.Button();
this.btnEast = new System.Windows.Forms.Button();
this.btnSouth = new System.Windows.Forms.Button();
this.btnUp = new System.Windows.Forms.Button();
this.btnDown = new System.Windows.Forms.Button();
this.groupBox5 = new System.Windows.Forms.GroupBox();
this.groupBox6 = new System.Windows.Forms.GroupBox();
this.containerAvailableRooms = new System.Windows.Forms.SplitContainer();
this.comRealms = new System.Windows.Forms.ComboBox();
this.btnCurrentRealm = new System.Windows.Forms.Button();
this.groupBox7 = new System.Windows.Forms.GroupBox();
this.lstZonesInRealm = new System.Windows.Forms.ListBox();
this.groupBox8 = new System.Windows.Forms.GroupBox();
this.lstRoomsInZone = new System.Windows.Forms.ListBox();
this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout(); this.splitContainer1.SuspendLayout();
@ -51,8 +69,18 @@
this.splitContainer2.Panel2.SuspendLayout(); this.splitContainer2.Panel2.SuspendLayout();
this.splitContainer2.SuspendLayout(); this.splitContainer2.SuspendLayout();
this.tabControl1.SuspendLayout(); this.tabControl1.SuspendLayout();
this.tabZoneCreation.SuspendLayout();
this.tabScript.SuspendLayout(); this.tabScript.SuspendLayout();
this.groupBox2.SuspendLayout(); this.groupBox2.SuspendLayout();
this.groupBox3.SuspendLayout();
this.groupBox4.SuspendLayout();
this.groupBox5.SuspendLayout();
this.groupBox6.SuspendLayout();
this.containerAvailableRooms.Panel1.SuspendLayout();
this.containerAvailableRooms.Panel2.SuspendLayout();
this.containerAvailableRooms.SuspendLayout();
this.groupBox7.SuspendLayout();
this.groupBox8.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// splitContainer1 // splitContainer1
@ -70,7 +98,7 @@
// //
this.splitContainer1.Panel2.Controls.Add(this.splitContainer2); this.splitContainer1.Panel2.Controls.Add(this.splitContainer2);
this.splitContainer1.Size = new System.Drawing.Size(794, 574); this.splitContainer1.Size = new System.Drawing.Size(794, 574);
this.splitContainer1.SplitterDistance = 210; this.splitContainer1.SplitterDistance = 238;
this.splitContainer1.TabIndex = 0; this.splitContainer1.TabIndex = 0;
// //
// propertyZone // propertyZone
@ -78,7 +106,7 @@
this.propertyZone.Dock = System.Windows.Forms.DockStyle.Fill; this.propertyZone.Dock = System.Windows.Forms.DockStyle.Fill;
this.propertyZone.Location = new System.Drawing.Point(0, 71); this.propertyZone.Location = new System.Drawing.Point(0, 71);
this.propertyZone.Name = "propertyZone"; this.propertyZone.Name = "propertyZone";
this.propertyZone.Size = new System.Drawing.Size(210, 503); this.propertyZone.Size = new System.Drawing.Size(238, 503);
this.propertyZone.TabIndex = 1; this.propertyZone.TabIndex = 1;
this.propertyZone.ToolbarVisible = false; this.propertyZone.ToolbarVisible = false;
// //
@ -89,7 +117,7 @@
this.groupBox1.Dock = System.Windows.Forms.DockStyle.Top; this.groupBox1.Dock = System.Windows.Forms.DockStyle.Top;
this.groupBox1.Location = new System.Drawing.Point(0, 0); this.groupBox1.Location = new System.Drawing.Point(0, 0);
this.groupBox1.Name = "groupBox1"; this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(210, 71); this.groupBox1.Size = new System.Drawing.Size(238, 71);
this.groupBox1.TabIndex = 0; this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
this.groupBox1.Text = "Zone Setup"; this.groupBox1.Text = "Zone Setup";
@ -99,7 +127,7 @@
this.btnCloseBuilder.Dock = System.Windows.Forms.DockStyle.Top; this.btnCloseBuilder.Dock = System.Windows.Forms.DockStyle.Top;
this.btnCloseBuilder.Location = new System.Drawing.Point(3, 39); this.btnCloseBuilder.Location = new System.Drawing.Point(3, 39);
this.btnCloseBuilder.Name = "btnCloseBuilder"; this.btnCloseBuilder.Name = "btnCloseBuilder";
this.btnCloseBuilder.Size = new System.Drawing.Size(204, 23); this.btnCloseBuilder.Size = new System.Drawing.Size(232, 23);
this.btnCloseBuilder.TabIndex = 12; this.btnCloseBuilder.TabIndex = 12;
this.btnCloseBuilder.Text = "Close Builder"; this.btnCloseBuilder.Text = "Close Builder";
this.btnCloseBuilder.UseVisualStyleBackColor = true; this.btnCloseBuilder.UseVisualStyleBackColor = true;
@ -110,7 +138,7 @@
this.btnSaveZone.Dock = System.Windows.Forms.DockStyle.Top; this.btnSaveZone.Dock = System.Windows.Forms.DockStyle.Top;
this.btnSaveZone.Location = new System.Drawing.Point(3, 16); this.btnSaveZone.Location = new System.Drawing.Point(3, 16);
this.btnSaveZone.Name = "btnSaveZone"; this.btnSaveZone.Name = "btnSaveZone";
this.btnSaveZone.Size = new System.Drawing.Size(204, 23); this.btnSaveZone.Size = new System.Drawing.Size(232, 23);
this.btnSaveZone.TabIndex = 11; this.btnSaveZone.TabIndex = 11;
this.btnSaveZone.Text = "Save Zone"; this.btnSaveZone.Text = "Save Zone";
this.btnSaveZone.UseVisualStyleBackColor = true; this.btnSaveZone.UseVisualStyleBackColor = true;
@ -128,9 +156,10 @@
// //
// splitContainer2.Panel2 // splitContainer2.Panel2
// //
this.splitContainer2.Panel2.Controls.Add(this.groupBox4);
this.splitContainer2.Panel2.Controls.Add(this.groupBox2); this.splitContainer2.Panel2.Controls.Add(this.groupBox2);
this.splitContainer2.Size = new System.Drawing.Size(580, 574); this.splitContainer2.Size = new System.Drawing.Size(552, 574);
this.splitContainer2.SplitterDistance = 365; this.splitContainer2.SplitterDistance = 347;
this.splitContainer2.TabIndex = 0; this.splitContainer2.TabIndex = 0;
// //
// tabControl1 // tabControl1
@ -141,15 +170,17 @@
this.tabControl1.Location = new System.Drawing.Point(0, 0); this.tabControl1.Location = new System.Drawing.Point(0, 0);
this.tabControl1.Name = "tabControl1"; this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0; this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(365, 574); this.tabControl1.Size = new System.Drawing.Size(347, 574);
this.tabControl1.TabIndex = 0; this.tabControl1.TabIndex = 0;
// //
// tabZoneCreation // tabZoneCreation
// //
this.tabZoneCreation.Controls.Add(this.groupBox5);
this.tabZoneCreation.Controls.Add(this.groupBox3);
this.tabZoneCreation.Location = new System.Drawing.Point(4, 22); this.tabZoneCreation.Location = new System.Drawing.Point(4, 22);
this.tabZoneCreation.Name = "tabZoneCreation"; this.tabZoneCreation.Name = "tabZoneCreation";
this.tabZoneCreation.Padding = new System.Windows.Forms.Padding(3); this.tabZoneCreation.Padding = new System.Windows.Forms.Padding(3);
this.tabZoneCreation.Size = new System.Drawing.Size(357, 548); this.tabZoneCreation.Size = new System.Drawing.Size(339, 548);
this.tabZoneCreation.TabIndex = 0; this.tabZoneCreation.TabIndex = 0;
this.tabZoneCreation.Text = "Zone Creation"; this.tabZoneCreation.Text = "Zone Creation";
this.tabZoneCreation.UseVisualStyleBackColor = true; this.tabZoneCreation.UseVisualStyleBackColor = true;
@ -190,47 +221,263 @@
// groupBox2 // groupBox2
// //
this.groupBox2.Controls.Add(this.lstRooms); this.groupBox2.Controls.Add(this.lstRooms);
this.groupBox2.Controls.Add(this.btnUnselectRoom);
this.groupBox2.Controls.Add(this.btnRoomEditor); this.groupBox2.Controls.Add(this.btnRoomEditor);
this.groupBox2.Controls.Add(this.btnUnselectRoom);
this.groupBox2.Dock = System.Windows.Forms.DockStyle.Top; this.groupBox2.Dock = System.Windows.Forms.DockStyle.Top;
this.groupBox2.Location = new System.Drawing.Point(0, 0); this.groupBox2.Location = new System.Drawing.Point(0, 0);
this.groupBox2.Name = "groupBox2"; this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(211, 209); this.groupBox2.Size = new System.Drawing.Size(201, 303);
this.groupBox2.TabIndex = 0; this.groupBox2.TabIndex = 0;
this.groupBox2.TabStop = false; this.groupBox2.TabStop = false;
this.groupBox2.Text = "Available Rooms"; this.groupBox2.Text = "Available Rooms";
// //
// btnUnselectRoom
//
this.btnUnselectRoom.Dock = System.Windows.Forms.DockStyle.Bottom;
this.btnUnselectRoom.Location = new System.Drawing.Point(3, 277);
this.btnUnselectRoom.Name = "btnUnselectRoom";
this.btnUnselectRoom.Size = new System.Drawing.Size(195, 23);
this.btnUnselectRoom.TabIndex = 2;
this.btnUnselectRoom.Text = "Unselect Room";
this.btnUnselectRoom.UseVisualStyleBackColor = true;
this.btnUnselectRoom.Click += new System.EventHandler(this.btnUnselectRoom_Click);
//
// groupBox3
//
this.groupBox3.Controls.Add(this.btnDown);
this.groupBox3.Controls.Add(this.btnUp);
this.groupBox3.Controls.Add(this.btnSouth);
this.groupBox3.Controls.Add(this.btnEast);
this.groupBox3.Controls.Add(this.btnWest);
this.groupBox3.Controls.Add(this.btnNorth);
this.groupBox3.Location = new System.Drawing.Point(3, 6);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(333, 236);
this.groupBox3.TabIndex = 0;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "Room Installed Doorways";
//
// btnRoomEditor
//
this.btnRoomEditor.Dock = System.Windows.Forms.DockStyle.Bottom;
this.btnRoomEditor.Location = new System.Drawing.Point(3, 254);
this.btnRoomEditor.Name = "btnRoomEditor";
this.btnRoomEditor.Size = new System.Drawing.Size(195, 23);
this.btnRoomEditor.TabIndex = 4;
this.btnRoomEditor.Text = "Build A Room";
this.btnRoomEditor.UseVisualStyleBackColor = true;
this.btnRoomEditor.Click += new System.EventHandler(this.btnRoomEditor_Click);
//
// lstRooms // lstRooms
// //
this.lstRooms.Dock = System.Windows.Forms.DockStyle.Fill; this.lstRooms.Dock = System.Windows.Forms.DockStyle.Fill;
this.lstRooms.FormattingEnabled = true; this.lstRooms.FormattingEnabled = true;
this.lstRooms.Location = new System.Drawing.Point(3, 16); this.lstRooms.Location = new System.Drawing.Point(3, 16);
this.lstRooms.Name = "lstRooms"; this.lstRooms.Name = "lstRooms";
this.lstRooms.Size = new System.Drawing.Size(205, 134); this.lstRooms.Size = new System.Drawing.Size(195, 238);
this.lstRooms.TabIndex = 3; this.lstRooms.Sorted = true;
this.lstRooms.TabIndex = 5;
this.lstRooms.SelectedIndexChanged += new System.EventHandler(this.lstRooms_SelectedIndexChanged); this.lstRooms.SelectedIndexChanged += new System.EventHandler(this.lstRooms_SelectedIndexChanged);
// //
// btnUnselectRoom // groupBox4
// //
this.btnUnselectRoom.Dock = System.Windows.Forms.DockStyle.Bottom; this.groupBox4.Controls.Add(this.propertyRoom);
this.btnUnselectRoom.Location = new System.Drawing.Point(3, 160); this.groupBox4.Dock = System.Windows.Forms.DockStyle.Bottom;
this.btnUnselectRoom.Name = "btnUnselectRoom"; this.groupBox4.Location = new System.Drawing.Point(0, 306);
this.btnUnselectRoom.Size = new System.Drawing.Size(205, 23); this.groupBox4.Name = "groupBox4";
this.btnUnselectRoom.TabIndex = 2; this.groupBox4.Size = new System.Drawing.Size(201, 268);
this.btnUnselectRoom.Text = "Unselect Room"; this.groupBox4.TabIndex = 1;
this.btnUnselectRoom.UseVisualStyleBackColor = true; this.groupBox4.TabStop = false;
this.btnUnselectRoom.Click += new System.EventHandler(this.btnUnselectRoom_Click); this.groupBox4.Text = "Room Preview";
// //
// btnRoomEditor // propertyRoom
// //
this.btnRoomEditor.Dock = System.Windows.Forms.DockStyle.Bottom; this.propertyRoom.Dock = System.Windows.Forms.DockStyle.Fill;
this.btnRoomEditor.Location = new System.Drawing.Point(3, 183); this.propertyRoom.Enabled = false;
this.btnRoomEditor.Name = "btnRoomEditor"; this.propertyRoom.HelpVisible = false;
this.btnRoomEditor.Size = new System.Drawing.Size(205, 23); this.propertyRoom.Location = new System.Drawing.Point(3, 16);
this.btnRoomEditor.TabIndex = 0; this.propertyRoom.Name = "propertyRoom";
this.btnRoomEditor.Text = "Build A Room"; this.propertyRoom.Size = new System.Drawing.Size(195, 249);
this.btnRoomEditor.UseVisualStyleBackColor = true; this.propertyRoom.TabIndex = 0;
this.btnRoomEditor.Click += new System.EventHandler(this.btnRoomEditor_Click); this.propertyRoom.ToolbarVisible = false;
//
// btnNorth
//
this.btnNorth.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
this.btnNorth.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnNorth.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnNorth.Location = new System.Drawing.Point(124, 19);
this.btnNorth.Name = "btnNorth";
this.btnNorth.Size = new System.Drawing.Size(85, 56);
this.btnNorth.TabIndex = 0;
this.btnNorth.Text = "North";
this.btnNorth.UseVisualStyleBackColor = false;
//
// btnWest
//
this.btnWest.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
this.btnWest.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnWest.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnWest.Location = new System.Drawing.Point(6, 60);
this.btnWest.Name = "btnWest";
this.btnWest.Size = new System.Drawing.Size(85, 56);
this.btnWest.TabIndex = 1;
this.btnWest.Text = "West";
this.btnWest.UseVisualStyleBackColor = false;
//
// btnEast
//
this.btnEast.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
this.btnEast.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnEast.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnEast.Location = new System.Drawing.Point(242, 60);
this.btnEast.Name = "btnEast";
this.btnEast.Size = new System.Drawing.Size(85, 56);
this.btnEast.TabIndex = 2;
this.btnEast.Text = "East";
this.btnEast.UseVisualStyleBackColor = false;
//
// btnSouth
//
this.btnSouth.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
this.btnSouth.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnSouth.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnSouth.Location = new System.Drawing.Point(124, 114);
this.btnSouth.Name = "btnSouth";
this.btnSouth.Size = new System.Drawing.Size(85, 56);
this.btnSouth.TabIndex = 3;
this.btnSouth.Text = "South";
this.btnSouth.UseVisualStyleBackColor = false;
//
// btnUp
//
this.btnUp.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
this.btnUp.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnUp.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnUp.Location = new System.Drawing.Point(6, 170);
this.btnUp.Name = "btnUp";
this.btnUp.Size = new System.Drawing.Size(85, 56);
this.btnUp.TabIndex = 4;
this.btnUp.Text = "Up";
this.btnUp.UseVisualStyleBackColor = false;
//
// btnDown
//
this.btnDown.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
this.btnDown.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnDown.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnDown.Location = new System.Drawing.Point(242, 170);
this.btnDown.Name = "btnDown";
this.btnDown.Size = new System.Drawing.Size(85, 56);
this.btnDown.TabIndex = 5;
this.btnDown.Text = "Down";
this.btnDown.UseVisualStyleBackColor = false;
//
// groupBox5
//
this.groupBox5.Controls.Add(this.groupBox8);
this.groupBox5.Controls.Add(this.groupBox7);
this.groupBox5.Controls.Add(this.groupBox6);
this.groupBox5.Location = new System.Drawing.Point(3, 248);
this.groupBox5.Name = "groupBox5";
this.groupBox5.Size = new System.Drawing.Size(333, 297);
this.groupBox5.TabIndex = 1;
this.groupBox5.TabStop = false;
this.groupBox5.Text = "Available Rooms";
//
// groupBox6
//
this.groupBox6.Controls.Add(this.containerAvailableRooms);
this.groupBox6.Dock = System.Windows.Forms.DockStyle.Top;
this.groupBox6.Location = new System.Drawing.Point(3, 16);
this.groupBox6.Name = "groupBox6";
this.groupBox6.Size = new System.Drawing.Size(327, 43);
this.groupBox6.TabIndex = 0;
this.groupBox6.TabStop = false;
this.groupBox6.Text = "Realms";
//
// containerAvailableRooms
//
this.containerAvailableRooms.Dock = System.Windows.Forms.DockStyle.Fill;
this.containerAvailableRooms.Location = new System.Drawing.Point(3, 16);
this.containerAvailableRooms.Name = "containerAvailableRooms";
//
// containerAvailableRooms.Panel1
//
this.containerAvailableRooms.Panel1.Controls.Add(this.comRealms);
//
// containerAvailableRooms.Panel2
//
this.containerAvailableRooms.Panel2.Controls.Add(this.btnCurrentRealm);
this.containerAvailableRooms.Size = new System.Drawing.Size(321, 24);
this.containerAvailableRooms.SplitterDistance = 191;
this.containerAvailableRooms.TabIndex = 0;
//
// comRealms
//
this.comRealms.Dock = System.Windows.Forms.DockStyle.Fill;
this.comRealms.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comRealms.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.comRealms.FormattingEnabled = true;
this.comRealms.Location = new System.Drawing.Point(0, 0);
this.comRealms.Name = "comRealms";
this.comRealms.Size = new System.Drawing.Size(191, 21);
this.comRealms.Sorted = true;
this.comRealms.TabIndex = 1;
this.comRealms.SelectedIndexChanged += new System.EventHandler(this.comRealms_SelectedIndexChanged);
//
// btnCurrentRealm
//
this.btnCurrentRealm.Dock = System.Windows.Forms.DockStyle.Fill;
this.btnCurrentRealm.Location = new System.Drawing.Point(0, 0);
this.btnCurrentRealm.Name = "btnCurrentRealm";
this.btnCurrentRealm.Size = new System.Drawing.Size(126, 24);
this.btnCurrentRealm.TabIndex = 0;
this.btnCurrentRealm.Text = "Select Owning Realm";
this.btnCurrentRealm.UseVisualStyleBackColor = true;
this.btnCurrentRealm.Click += new System.EventHandler(this.btnCurrentRealm_Click);
//
// groupBox7
//
this.groupBox7.Controls.Add(this.lstZonesInRealm);
this.groupBox7.Dock = System.Windows.Forms.DockStyle.Top;
this.groupBox7.Location = new System.Drawing.Point(3, 59);
this.groupBox7.Name = "groupBox7";
this.groupBox7.Size = new System.Drawing.Size(327, 105);
this.groupBox7.TabIndex = 2;
this.groupBox7.TabStop = false;
this.groupBox7.Text = "Zones Within Selected Realm";
//
// lstZonesInRealm
//
this.lstZonesInRealm.Dock = System.Windows.Forms.DockStyle.Fill;
this.lstZonesInRealm.FormattingEnabled = true;
this.lstZonesInRealm.Location = new System.Drawing.Point(3, 16);
this.lstZonesInRealm.Name = "lstZonesInRealm";
this.lstZonesInRealm.Size = new System.Drawing.Size(321, 82);
this.lstZonesInRealm.Sorted = true;
this.lstZonesInRealm.TabIndex = 0;
//
// groupBox8
//
this.groupBox8.Controls.Add(this.lstRoomsInZone);
this.groupBox8.Dock = System.Windows.Forms.DockStyle.Top;
this.groupBox8.Location = new System.Drawing.Point(3, 164);
this.groupBox8.Name = "groupBox8";
this.groupBox8.Size = new System.Drawing.Size(327, 127);
this.groupBox8.TabIndex = 3;
this.groupBox8.TabStop = false;
this.groupBox8.Text = "Rooms within Selected Zone";
//
// lstRoomsInZone
//
this.lstRoomsInZone.Dock = System.Windows.Forms.DockStyle.Fill;
this.lstRoomsInZone.FormattingEnabled = true;
this.lstRoomsInZone.Location = new System.Drawing.Point(3, 16);
this.lstRoomsInZone.Name = "lstRoomsInZone";
this.lstRoomsInZone.Size = new System.Drawing.Size(321, 108);
this.lstRoomsInZone.Sorted = true;
this.lstRoomsInZone.TabIndex = 0;
// //
// ZoneBuilder // ZoneBuilder
// //
@ -253,8 +500,18 @@
this.splitContainer2.Panel2.ResumeLayout(false); this.splitContainer2.Panel2.ResumeLayout(false);
this.splitContainer2.ResumeLayout(false); this.splitContainer2.ResumeLayout(false);
this.tabControl1.ResumeLayout(false); this.tabControl1.ResumeLayout(false);
this.tabZoneCreation.ResumeLayout(false);
this.tabScript.ResumeLayout(false); this.tabScript.ResumeLayout(false);
this.groupBox2.ResumeLayout(false); this.groupBox2.ResumeLayout(false);
this.groupBox3.ResumeLayout(false);
this.groupBox4.ResumeLayout(false);
this.groupBox5.ResumeLayout(false);
this.groupBox6.ResumeLayout(false);
this.containerAvailableRooms.Panel1.ResumeLayout(false);
this.containerAvailableRooms.Panel2.ResumeLayout(false);
this.containerAvailableRooms.ResumeLayout(false);
this.groupBox7.ResumeLayout(false);
this.groupBox8.ResumeLayout(false);
this.ResumeLayout(false); this.ResumeLayout(false);
} }
@ -267,7 +524,6 @@
private System.Windows.Forms.PropertyGrid propertyZone; private System.Windows.Forms.PropertyGrid propertyZone;
private System.Windows.Forms.SplitContainer splitContainer2; private System.Windows.Forms.SplitContainer splitContainer2;
private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.Button btnRoomEditor;
private System.Windows.Forms.TabControl tabControl1; private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tabZoneCreation; private System.Windows.Forms.TabPage tabZoneCreation;
private System.Windows.Forms.TabPage tabScript; private System.Windows.Forms.TabPage tabScript;
@ -275,7 +531,26 @@
private System.Windows.Forms.Button btnValidateScript; private System.Windows.Forms.Button btnValidateScript;
private System.Windows.Forms.Button btnCloseBuilder; private System.Windows.Forms.Button btnCloseBuilder;
private System.Windows.Forms.Button btnUnselectRoom; private System.Windows.Forms.Button btnUnselectRoom;
private System.Windows.Forms.GroupBox groupBox3;
public System.Windows.Forms.ListBox lstRooms; public System.Windows.Forms.ListBox lstRooms;
private System.Windows.Forms.Button btnRoomEditor;
private System.Windows.Forms.GroupBox groupBox4;
private System.Windows.Forms.PropertyGrid propertyRoom;
private System.Windows.Forms.Button btnNorth;
private System.Windows.Forms.Button btnSouth;
private System.Windows.Forms.Button btnEast;
private System.Windows.Forms.Button btnWest;
private System.Windows.Forms.Button btnDown;
private System.Windows.Forms.Button btnUp;
private System.Windows.Forms.GroupBox groupBox5;
private System.Windows.Forms.GroupBox groupBox6;
private System.Windows.Forms.SplitContainer containerAvailableRooms;
private System.Windows.Forms.ComboBox comRealms;
private System.Windows.Forms.Button btnCurrentRealm;
private System.Windows.Forms.GroupBox groupBox7;
private System.Windows.Forms.ListBox lstZonesInRealm;
private System.Windows.Forms.GroupBox groupBox8;
private System.Windows.Forms.ListBox lstRoomsInZone;
} }
} }

View file

@ -65,7 +65,7 @@
<Compile Include="MudEngine\GameObjects\Environment\InitialLocation.cs" /> <Compile Include="MudEngine\GameObjects\Environment\InitialLocation.cs" />
<Compile Include="MudEngine\GameObjects\Environment\Realm.cs" /> <Compile Include="MudEngine\GameObjects\Environment\Realm.cs" />
<Compile Include="MudEngine\GameObjects\Environment\Room.cs" /> <Compile Include="MudEngine\GameObjects\Environment\Room.cs" />
<Compile Include="MudEngine\GameObjects\Environment\TravelDirections.cs" /> <Compile Include="MudEngine\GameObjects\TravelDirections.cs" />
<Compile Include="MudEngine\GameObjects\Environment\Zone.cs" /> <Compile Include="MudEngine\GameObjects\Environment\Zone.cs" />
<Compile Include="MudEngine\Interfaces\IGameObject.cs" /> <Compile Include="MudEngine\Interfaces\IGameObject.cs" />
<Compile Include="MudEngine\Interfaces\IQuest.cs" /> <Compile Include="MudEngine\Interfaces\IQuest.cs" />

View file

@ -6,11 +6,10 @@ using MudDesigner.MudEngine.Objects.Environment;
namespace MudDesigner.MudEngine.Objects.Environment namespace MudDesigner.MudEngine.Objects.Environment
{ {
[Unusable(true)]
public struct StartingLocation public struct StartingLocation
{ {
public Room Room; public string Room;
public Zone Zone; public string Zone;
public Realm Realm; public string Realm;
} }
} }

View file

@ -1,13 +0,0 @@
namespace MudDesigner.MudEngine.Objects.Environment
{
public enum AvailableTravelDirections
{
None = 0,
North,
South,
East,
West,
Up,
Down,
}
}

View file

@ -14,6 +14,12 @@ namespace MudDesigner.MudEngine.Objects.Environment
set; set;
} }
[System.ComponentModel.Browsable(false)]
public List<Room> Rooms { get; set; } public List<Room> Rooms { get; set; }
public Zone()
{
Rooms = new List<Room>();
}
} }
} }

View file

@ -13,7 +13,7 @@ namespace MudDesigner
{ {
static class Program static class Program
{ {
public static ProjectInformation Project{ get; set; } public static ProjectInformation Project { get; set; }
public static Realm Realm { get; set; } public static Realm Realm { get; set; }
public static Zone Zone {get;set;} public static Zone Zone {get;set;}
public static Room Room { get; set; } public static Room Room { get; set; }