Major Changes:
- Finalized Adding/Removing Zones from within Realms (their Rooms included.) - Finalized Deleting objects. - Rooms can now be loaded and edited after Saving. Minor Changes: - Code Optimizations - Object Property organizing improved.
This commit is contained in:
parent
56ce8667ff
commit
d5ebbe186f
6 changed files with 36 additions and 7 deletions
|
@ -177,7 +177,7 @@ namespace MudDesigner
|
|||
z = (Zone)obj;
|
||||
//No realm assigned to it, so it's in the Root Zones directory.
|
||||
//Base our save path off of that
|
||||
if (String.IsNullOrEmpty(z.Realm))
|
||||
if (z.Realm == "No Realm Associated.")
|
||||
{
|
||||
objectPath = Path.Combine(FileManager.GetDataPath(SaveDataTypes.Zones), z.Name);
|
||||
filename = Path.Combine(objectPath, z.Filename);
|
||||
|
|
|
@ -69,7 +69,7 @@ namespace MudDesigner.MudEngine.GameObjects
|
|||
}
|
||||
}
|
||||
|
||||
[Category("Senses")]
|
||||
[Category("Environment Information")]
|
||||
[Description("If a user asks to use his/her senses to investigate an area, this is one of the results that will be displayed. Senses can be used to assist blind characters.")]
|
||||
[DefaultValue("You don't smell anything unsual.")]
|
||||
public string Smell
|
||||
|
@ -78,7 +78,7 @@ namespace MudDesigner.MudEngine.GameObjects
|
|||
set;
|
||||
}
|
||||
|
||||
[Category("Senses")]
|
||||
[Category("Environment Information")]
|
||||
[Description("If a user asks to use his/her senses to investigate an area, this is one of the results that will be displayed. Senses can be used to assist blind characters.")]
|
||||
[DefaultValue("You hear nothing of interest.")]
|
||||
public string Listen
|
||||
|
@ -87,7 +87,7 @@ namespace MudDesigner.MudEngine.GameObjects
|
|||
set;
|
||||
}
|
||||
|
||||
[Category("Senses")]
|
||||
[Category("Environment Information")]
|
||||
[Description("If a user asks to use his/her senses to investigate an area, this is one of the results that will be displayed. Senses can be used to assist blind characters.")]
|
||||
[DefaultValue("You feel nothing.")]
|
||||
public string Feel
|
||||
|
|
|
@ -61,7 +61,7 @@ namespace MudDesigner.MudEngine.GameObjects.Environment
|
|||
{
|
||||
Rooms = new List<Room>();
|
||||
IsSafe = false;
|
||||
//throw new NotSupportedException("Parameterless constructors of Type " + this.GetType().FullName + " is not supported.");
|
||||
Realm = "No Realm Associated.";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -178,7 +178,7 @@ namespace MudDesigner.MudEngine.UITypeEditors
|
|||
//Load the Zone and remove its link to the Realm
|
||||
Zone z = new Zone();
|
||||
z = (Zone)z.Load(currentFilename);
|
||||
z.Realm = "";
|
||||
z.Realm = "No Realm Associated.";
|
||||
//Remove the Zone from the Realm collection
|
||||
_Realm.Zones.Remove(z.Filename);
|
||||
|
||||
|
|
|
@ -64,6 +64,7 @@
|
|||
this.lstRooms.Name = "lstRooms";
|
||||
this.lstRooms.Size = new System.Drawing.Size(233, 290);
|
||||
this.lstRooms.TabIndex = 1;
|
||||
this.lstRooms.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.lstRooms_MouseDoubleClick);
|
||||
//
|
||||
// toolStrip1
|
||||
//
|
||||
|
@ -115,6 +116,7 @@
|
|||
// propertyRoom
|
||||
//
|
||||
this.propertyRoom.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.propertyRoom.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.propertyRoom.Location = new System.Drawing.Point(3, 16);
|
||||
this.propertyRoom.Name = "propertyRoom";
|
||||
this.propertyRoom.Size = new System.Drawing.Size(233, 317);
|
||||
|
|
|
@ -18,6 +18,7 @@ namespace MudDesigner.MudEngine.UITypeEditors
|
|||
{
|
||||
bool IsSaved;
|
||||
Room _Room;
|
||||
Zone _Zone;
|
||||
string savePath = "";
|
||||
public List<Room> Rooms { get; set; }
|
||||
|
||||
|
@ -27,13 +28,14 @@ namespace MudDesigner.MudEngine.UITypeEditors
|
|||
IsSaved = true;
|
||||
_Room = new Room();
|
||||
Rooms = new List<Room>();
|
||||
_Zone = zone;
|
||||
|
||||
string projectPath = Path.Combine(Application.StartupPath, "Project");
|
||||
string zonesPath = Path.Combine(projectPath, "Zones");
|
||||
string realmsPath = Path.Combine(projectPath, "Realms");
|
||||
savePath = "";
|
||||
|
||||
if (string.IsNullOrEmpty(zone.Realm))
|
||||
if (zone.Realm == "No Realm Associated")
|
||||
{
|
||||
//Project/Zones/ZoneName
|
||||
savePath = Path.Combine(zonesPath, zone.Name);
|
||||
|
@ -147,5 +149,30 @@ namespace MudDesigner.MudEngine.UITypeEditors
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void lstRooms_MouseDoubleClick(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (lstRooms.SelectedIndex == -1)
|
||||
return;
|
||||
|
||||
string roomName = lstRooms.SelectedItem.ToString();
|
||||
string zonePath = "";
|
||||
string zoneRoomPath = "";
|
||||
string roomFile = "";
|
||||
|
||||
if (_Zone.Realm == "No Realm Associated.")
|
||||
{
|
||||
zonePath = Path.Combine(FileManager.GetDataPath(SaveDataTypes.Zones), _Zone.Name);
|
||||
}
|
||||
else
|
||||
{
|
||||
zonePath = FileManager.GetDataPath(_Zone.Realm, _Zone.Name);
|
||||
}
|
||||
zoneRoomPath = Path.Combine(zonePath, "Rooms");
|
||||
roomFile = Path.Combine(zoneRoomPath, roomName);
|
||||
_Room = new Room();
|
||||
_Room = (Room)_Room.Load(roomFile);
|
||||
propertyRoom.SelectedObject = _Room;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue