diff --git a/MudEngine/Commands/CommandLogin.cs b/MudEngine/Commands/CommandLogin.cs
index 3e23830..036b41c 100644
--- a/MudEngine/Commands/CommandLogin.cs
+++ b/MudEngine/Commands/CommandLogin.cs
@@ -53,9 +53,6 @@ namespace MudEngine.Commands
}
player.Send("Welcome " + player.Name + "!");
-
- //string playerName = player.Receive();
- //TODO: Read user input...
return new CommandResults();
}
}
diff --git a/MudEngine/Commands/CommandWalk.cs b/MudEngine/Commands/CommandWalk.cs
index df4113e..cd91ff4 100644
--- a/MudEngine/Commands/CommandWalk.cs
+++ b/MudEngine/Commands/CommandWalk.cs
@@ -33,7 +33,7 @@ namespace MudEngine.Commands
//Move the player into their new room
player.Move(door.TravelDirection);
- CommandResults cmd = CommandEngine.ExecuteCommand("Look", player);
+ CommandResults cmd = player.CommandSystem.ExecuteCommand("Look", player);
string lookValue = "";
if (cmd.Result.Length != 0)
diff --git a/MudEngine/GameManagement/CommandEngine.cs b/MudEngine/GameManagement/CommandEngine.cs
index 529f293..4745622 100644
--- a/MudEngine/GameManagement/CommandEngine.cs
+++ b/MudEngine/GameManagement/CommandEngine.cs
@@ -14,19 +14,28 @@ using MudEngine.GameManagement;
namespace MudEngine.GameManagement
{
- public static class CommandEngine
+ public class CommandEngine
{
///
/// Gets or Sets a Dictionary list of available commands to use.
///
- static internal Dictionary Commands { get { return _Commands; } set { _Commands = value; } }
- static Dictionary _Commands = new Dictionary();
+ public static Dictionary CommandCollection { get; set; }
+
+ internal Dictionary _Commands { get; set; }
+
+ public CommandEngine()
+ {
+ if ((CommandCollection == null) || (CommandCollection.Count == 0))
+ CommandEngine.LoadBaseCommands();
+
+ _Commands = CommandCollection;
+ }
public static List GetCommands()
{
List temp = new List();
- foreach (string name in Commands.Keys)
+ foreach (string name in CommandEngine.CommandCollection.Keys)
{
temp.Add(name);
}
@@ -34,9 +43,22 @@ namespace MudEngine.GameManagement
return temp;
}
- public static bool GetCommand(string Name)
+ public static string GetCommand(object Parameter)
{
- if (Commands.ContainsKey(Name.ToLower()))
+ List