* XMLData.Save now has exception handling code in-place.
* Added better commenting to the majority of the projects files. * Removed command support from the server console. * Added a Client side command STOP that can be used to shut down the server. In the future that will be specific to Admins only. * Characters now have their save code invoked during server shut down. * Server shut down code added. Server.Stop() fully implemented.
This commit is contained in:
parent
b5c9f2967a
commit
f0ec29c240
8 changed files with 148 additions and 14 deletions
37
MudEngine/WinPC_Engine/GameScripts/Commands/CommandStop.cs
Normal file
37
MudEngine/WinPC_Engine/GameScripts/Commands/CommandStop.cs
Normal file
|
@ -0,0 +1,37 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
|
||||
using MudEngine.Core.Interface;
|
||||
using MudEngine.Game;
|
||||
using MudEngine.Game.Characters;
|
||||
using MudEngine.Networking;
|
||||
|
||||
namespace MudEngine.GameScripts.Commands
|
||||
{
|
||||
public class CommandStop : ICommand
|
||||
{
|
||||
public string Name { get; set; }
|
||||
|
||||
public string Description { get; set; }
|
||||
|
||||
public List<string> Help { get; set; }
|
||||
|
||||
public CommandStop()
|
||||
{
|
||||
this.Name = "Stop";
|
||||
this.Description = "Chat command that allows objects to communicate.";
|
||||
}
|
||||
|
||||
public void Execute(string command, StandardCharacter character)
|
||||
{
|
||||
//Grab a reference to the character for simplifying access.
|
||||
StandardGame game = character.Game;
|
||||
|
||||
//Stop the game.
|
||||
new Thread(game.Stop).Start();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue