MudEngine:
- Converted all Types from C# types to .NET Types (such as bool changed to Boolean, and int changed to Int32). - Zone no longer gets saved from within GameWorld.Save, but rather in Realm.Save() - Room no longer gets saved from within GameWorld.Save(), but rather in Zone.Save(); - Added new SaveWorld command that admins only can execute to force save the world. It's not fully implemented at this time. MudGame: - began work on command execution from within the server while it's running.
This commit is contained in:
parent
9585cede63
commit
a52ccf8da9
36 changed files with 365 additions and 297 deletions
|
@ -14,10 +14,10 @@ namespace MudGame
|
|||
{
|
||||
static class Program
|
||||
{
|
||||
const string SettingsFile = "Settings.ini";
|
||||
const String SettingsFile = "Settings.ini";
|
||||
static Game game;
|
||||
|
||||
static void Main(string[] args)
|
||||
static void Main(String[] args)
|
||||
{
|
||||
|
||||
Log.Write("Launching...");
|
||||
|
@ -61,7 +61,7 @@ namespace MudGame
|
|||
}
|
||||
else
|
||||
{
|
||||
Log.Write("Setting up " + obj.GetProperty().GameTitle + " Manager...");
|
||||
Log.Write("Setting up " + obj.GetProperty("GameTitle") + " Manager...");
|
||||
game = (Game)obj.Instance;
|
||||
scriptEngine = new ScriptEngine(game, ScriptEngine.ScriptTypes.Both);
|
||||
}
|
||||
|
@ -109,10 +109,31 @@ namespace MudGame
|
|||
}
|
||||
}
|
||||
|
||||
Console.Title = game.GameTitle;
|
||||
|
||||
if (game.IsMultiplayer)
|
||||
Console.Title += " server running.";
|
||||
|
||||
List<char> buf = new List<char>();
|
||||
|
||||
while (game.IsRunning)
|
||||
{
|
||||
game.Update();
|
||||
System.Threading.Thread.Sleep(1);
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
ConsoleKeyInfo info = Console.ReadKey();
|
||||
|
||||
if (info.KeyChar == '\r')
|
||||
{
|
||||
foreach (char c in buf)
|
||||
sb.Append(c);
|
||||
|
||||
game.PlayerCollection[0].ExecuteCommand(sb.ToString());
|
||||
}
|
||||
else
|
||||
buf.Add(info.KeyChar);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue