Mud Designer:

- Auto-saving objects is now complete.
 - Removed Save Object button
 - Object Properties no longer displays the Project Information on startup
 - Objects that can be edited within the Designer are displayed in Blue in the treeview
 - Objects that can only be edited within another objects Mini-Editor are displayed in Red and cannot be edited within the main Designer
 - Folders are displayed in Black
 - Objects are not auto-saved until the objects Name is changed from 'New Object'
 - The designer checks to see if the object has been saved yet prior to creating a new object.
 - Double clicking an editable object (shown in blue text) now loads the object for editing.
 - Menu item Project->Game Objects->Environment->New Room opens the Zones Mini-Room Editor if a Zone is loaded.
 - Tooltips added to the Project Explorer and Object Properties panes

Mud Engine:
 - FileManager returns the new directory layout when using GetDataPath
 - Added Zones to SaveDataTypes enum.
 - Game Objects now have a Description attribute attached to their public properties so the Designer can display a description of what the property is for within the Object Properties pane.
 - Added PreCacheObjects Boolean to ProjectInformation for pre-loading objects when the runtime is built.
 - All objects Filename is now set to readonly and cannot be edited within the Designer
 - Started work on Realm.GetZone() method.
 - Room.Zone is no longer hidden from the Object Properties Pane, but set to Readonly.
 - Began work on Moving a Zones Rooms when a Zone is moved within a Realm. 
 - Removed un-needed code within the RealmEditor 
 - UIRoomControl now creates and saves Rooms. Duplicate Rooms cannot be created and Room re-naming is implemented.
 - Removed remaining old code for previous Mud Designer Editors from within Program.cs
This commit is contained in:
Scionwest_cp 2010-01-10 17:57:52 -08:00
parent ecd2645421
commit 98857cc0de
19 changed files with 776 additions and 451 deletions

View file

@ -13,6 +13,7 @@ namespace MudDesigner.MudEngine.GameObjects
public class BaseObject : IGameObject
{
[Category("Object Setup")]
[Description("The Display Name assigned to this object.")]
//Required to refresh Filename property in the editors propertygrid
[RefreshProperties(RefreshProperties.All)]
public string Name
@ -29,6 +30,7 @@ namespace MudDesigner.MudEngine.GameObjects
}
[Category("Object Setup")]
[Description("A brief description of this object. The description is displayed to users when they use a command for investigating an object")]
public string Description
{
get;
@ -36,10 +38,13 @@ namespace MudDesigner.MudEngine.GameObjects
}
[Category("Object Setup")]
[Description("The object script that can manipulate the object during the games life.")]
[EditorAttribute(typeof(UIScriptEditor), typeof(System.Drawing.Design.UITypeEditor))]
public string Script { get; set; }
[Category("Object Setup")]
[ReadOnly(true)]
[Description("The filename of the current object. This is assigned by the engine and not editable.")]
public string Filename
{
//Returns the name of the object + the objects Type as it's extension.
@ -59,6 +64,7 @@ namespace MudDesigner.MudEngine.GameObjects
}
[Category("Senses")]
[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
{
@ -67,6 +73,7 @@ namespace MudDesigner.MudEngine.GameObjects
}
[Category("Senses")]
[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
{
@ -75,6 +82,7 @@ namespace MudDesigner.MudEngine.GameObjects
}
[Category("Senses")]
[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
{

View file

@ -9,6 +9,7 @@ namespace MudDesigner.MudEngine.GameObjects
public class Currency : BaseObject
{
[Category("Currency Settings")]
[Description("The value of the currency is based off the BaseCurrencyValue set in the Project Information. If BaseCurrencyValue is 1, and a new Currency is 10, then it will take 10 BaseCurrency to equal 1 of the new Currencies.")]
[DefaultValue(100)]
/// <summary>
/// The value of this currency. It should be how many 'base currency' it takes to equal 1 of this currency

View file

@ -15,6 +15,7 @@ namespace MudDesigner.MudEngine.GameObjects.Environment
{
[Category("Environment Information")]
[Description("A collection of Zones that are contained within this Realm. Players can traverse the world be traveling through Rooms that are contained within Zones. Note that it is not required to place a Zone into a Realm.")]
[EditorAttribute(typeof(UIRealmEditor), typeof(System.Drawing.Design.UITypeEditor))]
public List<string> Zones { get; set; }
@ -23,26 +24,32 @@ namespace MudDesigner.MudEngine.GameObjects.Environment
Zones = new List<string>();
}
public Zone GetZone(string ZoneName)
/// <summary>
/// Returns the requested Zone if the Zone exists within this Realm.
/// </summary>
/// <param name="zoneName"></param>
/// <returns></returns>
public Zone GetZone(string zoneName)
{
string zoneFilename = "";
//correct the zonename if needed
if (!ZoneName.EndsWith(".zone"))
ZoneName += ".zone";
//build our path
string realmPath = Path.Combine(FileManager.GetDataPath(SaveDataTypes.Realms), this.Name);
//get a collection of all the zones within the realm
string[] files = Directory.GetFiles(realmPath, "*.zone");
Zone zone = new Zone();
//look four our zone file
foreach (string file in files)
if (!zoneName.EndsWith(".zone"))
zoneFilename = zoneName + ".zone";
else
{
if (file == ZoneName)
{
string zonePath = Path.Combine(realmPath, Path.GetDirectoryName(file));
}
zoneName = Path.GetFileNameWithoutExtension(zoneName);
zoneFilename = zoneName;
}
string zonePath = FileManager.GetDataPath(this.Name, zoneFilename);
zonePath = Path.Combine(zonePath, zoneName);
zoneFilename = Path.Combine(zonePath, zoneFilename);
if (File.Exists(zoneFilename))
{
Zone z = new Zone();
z = (Zone)FileManager.Load(zoneFilename, z);
return z;
}
return null;

View file

@ -10,7 +10,8 @@ namespace MudDesigner.MudEngine.GameObjects.Environment
{
public class Room : BaseObject
{
[Category("Room Information")]
[Category("Environment Information")]
[Description("Shows what rooms are currently created and linked to within this Room.")]
[ReadOnly(true)]
public string DoorList
{
@ -34,10 +35,13 @@ namespace MudDesigner.MudEngine.GameObjects.Environment
}
}
[Browsable(false)]
[Category("Environment Information")]
[Description("Allows for linking of Rooms together via Doorways")]
public List<Door> InstalledDoors;
[Browsable(false)]
[ReadOnly(true)]
[Description("This is the Zone that the Room is currently assigned to.")]
[Category("Environment Information")]
public string Zone
{
get;
@ -46,6 +50,7 @@ namespace MudDesigner.MudEngine.GameObjects.Environment
[Category("Environment Information")]
[DefaultValue(false)]
[Description("Determins if the Player can be attacked within this Room or not.")]
public bool IsSafe
{
get;
@ -56,6 +61,7 @@ namespace MudDesigner.MudEngine.GameObjects.Environment
public Room()
{
InstalledDoors = new List<Door>();
IsSafe = false;
}
}
}

View file

@ -18,6 +18,7 @@ namespace MudDesigner.MudEngine.GameObjects.Environment
{
[Category("Environment Information")]
[DefaultValue(0)]
[Description("The amount to drain each stat by if StatDrain is enabled.")]
public int StatDrainAmount
{
get;
@ -25,6 +26,7 @@ namespace MudDesigner.MudEngine.GameObjects.Environment
}
[Category("Environment Information")]
[Description("Enable or Disable the ability for draining stats while traversing.")]
[DefaultValue(false)]
public bool StatDrain
{
@ -34,6 +36,7 @@ namespace MudDesigner.MudEngine.GameObjects.Environment
[ReadOnly(true)]
[Category("Environment Information")]
[Description("The Realm that this Zone is assigned to. It is not required to be contained within a Realm.")]
public string Realm
{
get;
@ -41,6 +44,7 @@ namespace MudDesigner.MudEngine.GameObjects.Environment
}
[Category("Environment Information")]
[Description("Determins if the Player can be attacked within this Room or not.")]
[DefaultValue(false)]
public bool IsSafe
{
@ -50,12 +54,13 @@ namespace MudDesigner.MudEngine.GameObjects.Environment
[Category("Environment Information")]
[EditorAttribute(typeof(UIRoomEditor), typeof(UITypeEditor))]
[ReadOnly(false)]
[Description("Collection of Rooms that have been created. Editing the Rooms Collection lets you manage the Zones rooms.")]
public List<Room> Rooms { get; set; }
public Zone()
{
Rooms = new List<Room>();
IsSafe = false;
//throw new NotSupportedException("Parameterless constructors of Type " + this.GetType().FullName + " is not supported.");
}