Mud Designer:

- Removed from solution

Mud Engine:
 - Moved the CommandEngine, CommandResults and ICommand Interface out from the Commands namespace and into GameManagement since they manage the game commands.
 - Added CommandExit class to provide the ability to exit a game once running. This is fully implemented.
 - Realms, Zones and Rooms now have an IsInitial property for determining if this is an initial location for the Game.
 - Renamed GameSetup to Game.
 - Corrected GameObject being in the incorrect namespace.
 - Corrected the ScriptEngine not 
 - CommandEngine no longer needs a Name argument. Arguments changed from 5 to 4 due to this change.

Mud Game:
 - Added Example Game used for testing various MUDEngine features and testing constructability of games using the engine.
 - Currently only contains 1 Realm, 1 Zone and Two Rooms. Only working command is Exit.
This commit is contained in:
Scionwest_cp 2010-07-18 13:52:16 -07:00
parent 06266b7245
commit b8f6be12c0
16 changed files with 374 additions and 40 deletions

View file

@ -52,17 +52,29 @@ namespace MudEngine.GameObjects.Environment
set;
}
/// <summary>
/// Gets or Sets the ability for this Zone to be the initial starting Zone for the game.
/// </summary>
[Category("Environment Information")]
[Description("Sets that this Zone is a starting Zone for the game.")]
[DefaultValue(false)]
public bool IsStartingZone
{
get;
set;
}
[Category("Environment Information")]
//[EditorAttribute(typeof(UIRoomEditor), typeof(UITypeEditor))]
[Description("Collection of Rooms that have been created. Editing the Rooms Collection lets you manage the Zones rooms.")]
public List<string> Rooms { get; set; }
public List<Room> Rooms { get; set; }
[Category("Environment Information")]
public string EntranceRoom { get; set; }
public Zone()
{
Rooms = new List<string>();
Rooms = new List<Room>();
IsSafe = false;
Realm = "No Realm Associated.";
}
@ -76,13 +88,13 @@ namespace MudEngine.GameObjects.Environment
{
var filterQuery =
from room in Rooms
where room == name
where room.Name == name
select room;
foreach (string room in filterQuery)
foreach (Room room in filterQuery)
{
Room r = new Room();
return (Room)r.Load(room, this.Name);
return (Room)r.Load(room.Name, this.Name);
}
return null;
}
@ -94,7 +106,7 @@ namespace MudEngine.GameObjects.Environment
/// </summary>
public void RebuildRoomCollection()
{
Rooms = new List<string>();
Rooms = new List<Room>();
//Create our collection of Rooms.
string realmPath = Path.Combine(FileManager.GetDataPath(SaveDataTypes.Realms), this.Realm);
string zonePath = Path.Combine(realmPath, this.Name);
@ -114,7 +126,7 @@ namespace MudEngine.GameObjects.Environment
Room r = new Room();
r = (Room)r.Load(Path.GetFileNameWithoutExtension(file));
//r = (Room)FileManager.Load(file, r);
this.Rooms.Add(r.Name);
this.Rooms.Add(r);
}
//Save the re-built Room collection