MudEngine:

- Added BaseCharacter.FlushConsole() method. Sends a hex sequence to the clients telnet terminal that clears the screen. If IsMultiplayer=false then it just clears the C# Console.
 - Added a 'Clear' command for users to use. It invokes the new FlushConsole command.
 - Removed the need for a full file path and filename when calling an objects save method. Now it just needs the path.
 - Adjusted the Exit command, Login command and Save command to reflect the objects save parameter changes.
 - Removed the Unique ID from objects. 
 - All objects now reference each other via their filenames rather than their object names. Allows for 3 objects with the name Bedroom to exist, but with different filenames such as Bedroom1, Bedroom2 etc.
 - Zone now has a GetRoomByName method that replace the removed GetRoomByID method. Returns a List<> collection of Rooms found with a matching filename.
 - BaseCharacter updated to work with the new Zone.GetRoomByName method.
 - Realm.GetZoneByID renamed to GetZoneByName()
This commit is contained in:
Scionwest_cp 2010-08-13 21:35:46 -07:00
parent 717034f9ed
commit 9585cede63
11 changed files with 144 additions and 82 deletions

View file

@ -83,21 +83,6 @@ namespace MudEngine.GameObjects.Environment
Realm = "No Realm Associated.";
}
/// <summary>
///
/// </summary>
/// <param name="RoomName"></param>
/// <returns></returns>
public Room GetRoomByID(Int32 id)
{
foreach (Room room in RoomCollection)
{
if (room.ID == id)
return room;
}
return null;
}
/// <summary>
/// Adds the supplied room into the Zones Room collection.
/// </summary>
@ -122,10 +107,26 @@ namespace MudEngine.GameObjects.Environment
//TODO: Check for duplicate Rooms.
RoomCollection.Add(room);
room.Zone = Name;
room.Zone = Filename;
room.Realm = Realm;
}
public List<Room> GetRoomByFilename(string filename)
{
List<Room> rooms = new List<Room>();
foreach (Room r in RoomCollection)
{
if (r.Filename == filename)
{
rooms.Add(r);
}
}
return rooms;
}
public void LinkRooms(AvailableTravelDirections departureDirection, Room arrivalRoom, Room departureRoom)
{
LinkRooms(departureDirection, arrivalRoom, departureRoom, 0);