MudEngine:

- Rooms can now be linked automatically via the new Zone.LinkRooms method. Room linking can no longer be done manually as the Doorways property is now read-only.
 - Door.Description has been removed. Doorway description will need to be included in Room.Description or Room.DetailedDescription properties.
 - Added DetailedDescription to make creating multi-line descriptions easier. Not supported by the Look command yet.
 - Game.IsRunning is now read-only. The Game will manage this property on its own.
 - BaseCharacter.ExecuteCommand now will always return a string. Simplifying the game loop for users as they no longer need to check what Type was returned by the command.
 - Doors now contain a DepartureRoom and a ArrivalRoom property allowing for easy access to Rooms that are linked together.
 - Fixed a bug where Game, Realms and Zones always assigned IsInitial to Realms, Zones and Rooms when added to the collections. Collection would contain multiple IsInitial objects.
 - Removed Room.InstalledDoorways property as that was used only by the old Designer
 - Removed Room.Load() as that implementation of it is obsolete.

MudGame:
 - Revised Zeroth to build it's Zone and Rooms using the new Zone.LinkRooms function.
 - Greatly revised Program.cs and the Game loop to take advantage of many of the automations provided by the Engine now.
This commit is contained in:
Scionwest_cp 2010-07-25 20:50:39 -07:00
parent 7e3cf1eb0c
commit e145d57682
11 changed files with 138 additions and 184 deletions

View file

@ -58,7 +58,7 @@ namespace MudEngine.GameObjects.Characters
}
//We have a doorway, lets move to the next room.
CurrentRoom = Game.GetRealm(CurrentRoom.Realm).GetZone(CurrentRoom.Zone).GetRoom(CurrentRoom.GetDoor(travelDirection).ConnectedRoom);
CurrentRoom = CurrentRoom.GetDoor(travelDirection).ArrivalRoom;
OnTravel(travelDirection);
@ -70,11 +70,23 @@ namespace MudEngine.GameObjects.Characters
//TODO: Check the Room/Zone/Realm to see if anything needs to occure during travel.
}
public CommandResults ExecuteCommand(string command)
public String ExecuteCommand(string command)
{
//TODO: Character class can handle a lot of the command management here, checking various things prior to sending
//the command off to the command engine for execution.
return CommandEngine.ExecuteCommand(command, this);
CommandResults result = CommandEngine.ExecuteCommand(command, this);
if (result.Result is string[])
{
StringBuilder sb = new StringBuilder();
foreach (string item in result.Result)
sb.AppendLine(item);
return sb.ToString();
}
return "";
}
public void Initialize(ref MudEngine.Networking.ClientSocket rcs)