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
|
@ -39,27 +39,16 @@ namespace MudServer
|
|||
game.ServerType = ProtocolType.Tcp;
|
||||
game.ServerPort = 555;
|
||||
game.MaximumPlayers = 1000;
|
||||
|
||||
game.PlayerCollection.Add(serverAdmin);
|
||||
Game.IsDebug = true;
|
||||
|
||||
game.Start();
|
||||
string command = "";
|
||||
|
||||
while (game.IsRunning)
|
||||
{
|
||||
if (!Console.KeyAvailable)
|
||||
{
|
||||
Console.Write(Log.GetMessages());
|
||||
Log.FlushMessages();
|
||||
System.Threading.Thread.Sleep(1);
|
||||
}
|
||||
//TODO: Fix Me D:
|
||||
else if (Console.ReadKey().Key == ConsoleKey.Enter)
|
||||
CommandEngine.ExecuteCommand(command, serverAdmin);
|
||||
else if (Console.ReadKey().Key == ConsoleKey.Backspace)
|
||||
Log.Write("Backspace is not currently supported :(");
|
||||
else
|
||||
command += Console.ReadKey().KeyChar;
|
||||
Console.Write(Log.GetMessages());
|
||||
Log.FlushMessages();
|
||||
System.Threading.Thread.Sleep(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue