MudCompiler:
- Updated to work with ScriptingEngine changes. MudEngine: - Game.PlayerCollection changed to a List<>. Server obtains a array version of it within Server.initialize() via players = pbs.ToArray(). - All BaseObject classes now require a reference to the Game and contain a property called ActiveGame. - Player.Game removed and now uses it's parent objects ActiveGame property. - Player.Role property added. Uses the new SecurityRoles enum that specifies what level of access the player has. - ScriptEngine now loads all libraries found within the specified ScriptsPath directory, instances the scripts and places them into a collection. - Custom character script instancing is now supported, but not fully implemented throughout the engine. They can be loaded, but not used during runtime at this time.
This commit is contained in:
parent
631ce62e73
commit
9b023a2092
24 changed files with 127 additions and 74 deletions
|
@ -9,6 +9,7 @@ using System.IO;
|
|||
|
||||
//MUD Engine
|
||||
using MudEngine.FileSystem;
|
||||
using MudEngine.GameManagement;
|
||||
|
||||
namespace MudEngine.GameObjects
|
||||
{
|
||||
|
@ -99,15 +100,17 @@ namespace MudEngine.GameObjects
|
|||
|
||||
private string _Filename = "";
|
||||
private string _Name = "";
|
||||
internal Game ActiveGame { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Initializes the base object
|
||||
/// </summary>
|
||||
public BaseObject()
|
||||
public BaseObject(Game game)
|
||||
{
|
||||
Script = "";
|
||||
_Name = "New " + this.GetType().Name;
|
||||
_Filename = _Name + "." + this.GetType().Name;
|
||||
ActiveGame = game;
|
||||
|
||||
this.Feel = "You feel nothing.";
|
||||
this.Listen = "You hear nothing of interest.";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue