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:
parent
7e3cf1eb0c
commit
e145d57682
11 changed files with 138 additions and 184 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue