Engine:
- Removed the ManagedScripting Engine from the project. Scripting will be implemented at a later time using a custom build engine. - Room.Load was re-wrote to allow for loading a supplied room name (not a full filename). The Room will load the supplied Roomname by checking within it's current Zone. Rooms within different Zones can be loaded by supplying a Zone name as one of the optional parameters. Same goes for loading Rooms within a different Realm - All classes using the original Room.Load code have been tweaked to use the new code. Cuts the needed code used by each individual class by 80%. - Room.InstallPath Property added for returning the full filename and location of the Room where it's currently installed. Designer: - Room Designer now supports deleting Rooms. - Doorway Editor no longer fails when attempting to change doorway Traveling Directions. Runtime: - No longer prints blank lines if the object does not contain any text to print. - Added a 2nd Print method with a boolean argument for printing blank lines by force if needed. Note: Room Deleting and Room.Load code was only tested using Rooms within Root Zones. Rooms contained within a Zone owned by a Realm was not tested.
This commit is contained in:
parent
59502408ce
commit
f79a5d482b
15 changed files with 147 additions and 92 deletions
|
@ -33,23 +33,8 @@ namespace MudDesigner.MudEngine.GameCommands
|
|||
|
||||
if (door.TravelDirection == direction)
|
||||
{
|
||||
string zonePath = "";
|
||||
string roomPath = "";
|
||||
string roomFilename = "";
|
||||
room = (Room)room.Load(door.ConnectedRoom);
|
||||
|
||||
if (room.Realm == "No Realm Associated.")
|
||||
{
|
||||
zonePath = FileManager.GetDataPath(SaveDataTypes.Zones);
|
||||
zonePath = Path.Combine(zonePath, room.Zone);
|
||||
}
|
||||
else
|
||||
{
|
||||
zonePath = FileManager.GetDataPath(room.Realm, room.Zone);
|
||||
}
|
||||
|
||||
roomPath = Path.Combine(zonePath, "Rooms");
|
||||
roomFilename = Path.Combine(roomPath, door.ConnectedRoom + ".room");
|
||||
room = (Room)room.Load(roomFilename);
|
||||
CommandResults cmd = CommandEngine.ExecuteCommand("Look", player, project, room, "Look");
|
||||
string lookValue = "";
|
||||
|
||||
|
@ -57,7 +42,6 @@ namespace MudDesigner.MudEngine.GameCommands
|
|||
lookValue = cmd.Result[0].ToString();
|
||||
|
||||
return new CommandResults(new object[] { lookValue, room });
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue