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:
parent
386d90df19
commit
c7d227745c
11 changed files with 69 additions and 38 deletions
|
|
@ -104,7 +104,7 @@ namespace MudGame
|
|||
//scripts might miss this, so we check for it.
|
||||
if (!game.IsMultiplayer)
|
||||
{
|
||||
if ((game.PlayerCollection[0] == null) || (game.PlayerCollection[0].Name == "New BaseCharacter"))
|
||||
if ((game.GetPlayerCollection()[0] == null) || (game.GetPlayerCollection()[0].Name == "New BaseCharacter"))
|
||||
{
|
||||
Log.Write("Error! No player available for creation!", true);
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue