Mud Designer:

- Added new Project. Mud Designer project will include the GUI elements needed for graphically building a MUD. Due to Environment creation being finalized, work on a GUI based Environment creation can start.

Mud Engine:
 - Objects no longer require a path to be supplied when calling Object.Save()
 - EditRealm command now edits senses.
 - EditRoom now fully supports creating doorways, however editing existing doorways and linking to existing rooms is not implemented. This command only supports creating new doorways for non-existing Rooms (Rooms are generated as needed)
 - EditZone Now fully supports senses and implemented.
 - Game now supports loading of .ini files when calling Game.Load()
 - All objects now include a SavePath properties. Override this to supply a path for where the object needs to be saved. All Environment and BaseCharacter objects override the BaseObject.SavePath to save into ActiveGame.DataPaths.Environemnts and Players respectively.
 - ObjectCollection now instanced during ScriptEngine initialization to prevent exceptions during runtime.
 - Create command no longer converts all names to lower case.
 - Updated the Walk command to execute the Look command in a safe manor without injecting a command into the player Telnet console.
This commit is contained in:
Scionwest_cp 2010-09-26 08:00:34 -07:00
parent 304b2d07eb
commit a347607337
35 changed files with 2013 additions and 60 deletions

View file

@ -77,6 +77,14 @@ namespace MudEngine.GameObjects.Environment
[Category("Environment Information")]
public Room InitialRoom { get; set; }
protected override String SavePath
{
get
{
return Path.Combine(ActiveGame.DataPaths.Environment, Path.GetFileNameWithoutExtension(this.Realm), "Zones", Path.GetFileNameWithoutExtension(Filename));
}
}
public Zone(GameManagement.Game game)
: base(game)
{
@ -86,13 +94,11 @@ namespace MudEngine.GameObjects.Environment
Realm = "No Realm Associated.";
}
public override void Save(String path)
public override void Save()
{
path = Path.Combine(path, Path.GetFileNameWithoutExtension(Filename));
base.Save();
base.Save(path);
String filename = Path.Combine(path, Filename);
String filename = Path.Combine(SavePath, Filename);
FileManager.WriteLine(filename, this.IsInitialZone.ToString(), "IsInitialZone");
FileManager.WriteLine(filename, this.IsSafe.ToString(), "IsSafe");
@ -103,11 +109,11 @@ namespace MudEngine.GameObjects.Environment
if (this.InitialRoom.Name != "New Room")
FileManager.WriteLine(filename, this.InitialRoom.Filename, "InitialRoom");
String roomPath = Path.Combine(path, "Rooms");
String roomPath = Path.Combine(SavePath, "Rooms");
foreach (Room r in RoomCollection)
{
FileManager.WriteLine(filename, r.Filename, "RoomCollection");
r.Save(roomPath);
r.Save();
}
}