Commands script folder renamed to BaseCommands. Users creating custom commands are encouraged to create them in a "Commands" or "Custom Commands" folder.

This commit is contained in:
Scionwest_cp 2012-03-10 19:43:42 -08:00
parent 11b2e73f35
commit 32210124e0
8 changed files with 11 additions and 12 deletions

View file

@ -1,47 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using MudEngine.Core.Interfaces;
using MudEngine.Game;
using MudEngine.Game.Characters;
using MudEngine.Networking;
namespace MudEngine.GameScripts.Commands
{
public class Stop : ICommand
{
public string Name { get; set; }
public string Description { get; set; }
public List<string> Help { get; set; }
public Stop()
{
this.Name = "Stop";
this.Description = "Chat command that allows objects to communicate.";
}
public Boolean Execute(string command, StandardCharacter character)
{
//Grab a reference to the character for simplifying access.
StandardGame game = character.Game;
//Stop the game.
if (character.Role == CharacterRoles.Admin)
{
new Thread(game.Stop).Start();
return true;
}
else
{
//Since a non-admin character attempted this command,
//tell them they used a invalid command
return false;
}
}
}
}