MudEngine:

- Player movement command now fully implemented. 
 - Game.GetRealm() added to retrieve a Realm within the games RealmCollection property
 - Game.End() added to perform game ending duties and shut down the Server
 - Server now loses opened threads.
 - Player.Move() added to move the player from Room to Room.
 - Room.DoorwayExist() tweaked to work with the new way Environments are managed.

MudGame:
 - Now executes the Look command on startup so the player can see where they are located at.
 - Implements the new Game.End() method and fixes the game hanging upon exit.
This commit is contained in:
Scionwest_cp 2010-07-25 18:33:21 -07:00
parent 19e3ec0936
commit 70533582a6
7 changed files with 57 additions and 10 deletions

View file

@ -230,6 +230,13 @@ namespace MudEngine.GameManagement
return true;
}
public void End()
{
//Place ending code here for game shut down.
//TODO: Save content on shutdown.
Server.EndServer();
}
public void Save(string filename)
{
string directory = Path.GetDirectoryName(filename);
@ -270,6 +277,17 @@ namespace MudEngine.GameManagement
InitialRealm = realm;
}
public Realm GetRealm(string realmName)
{
foreach (Realm realm in RealmCollection)
{
if (realm.Name == realmName)
return realm;
}
return null;
}
//TODO: This should be internal only; C# property using get; internal set; so only MudEngine.dll may edit this collection
public List<BaseCharacter> PlayerCollection;