MudEngine:

- Set the Game.PlayerCollection property to Protected. You can no longer modify this list unless the class inherits from Game. Only 1 script is allowed to inherit from Game.
 - Created Game.GetPlayerCollection() method for retrieving a read-only reference to the playerCollection so scripts can access player data it might needs.
 - Updated various classes and scripts due to no longer being able to access the PlayerCollection property.
This commit is contained in:
Scionwest_cp 2010-08-20 14:55:06 -07:00
parent 386d90df19
commit c7d227745c
11 changed files with 69 additions and 38 deletions

View file

@ -154,11 +154,10 @@ namespace MudEngine.GameManagement
#endregion
#region Networking
//TODO: This should be internal only; C# property using get; internal set; so only MudEngine.dll may edit this collection
/// <summary>
/// Collection of players currently running on the server.
/// </summary>
public BaseCharacter[] PlayerCollection;
protected BaseCharacter[] PlayerCollection;
/// <summary>
/// Gets the current running Server object.
@ -279,7 +278,7 @@ namespace MudEngine.GameManagement
/// <summary>
/// Shuts down the Game and Server.
/// </summary>
public void Shutdown()
public virtual void Shutdown()
{
Log.Write("Server shutdown requested...");
@ -429,6 +428,11 @@ namespace MudEngine.GameManagement
Log.Write("Game Restore complete.");
}
public BaseCharacter[] GetPlayerCollection()
{
return PlayerCollection;
}
/// <summary>
/// Starts the Server.
/// </summary>