diff --git a/MUDCompiler/frmCompiler.cs b/MUDCompiler/frmCompiler.cs index d8f1364..ade0e89 100644 --- a/MUDCompiler/frmCompiler.cs +++ b/MUDCompiler/frmCompiler.cs @@ -11,6 +11,8 @@ namespace MUDCompiler { public partial class frmCompiler : Form { + MudEngine.GameManagement.Game game = new MudEngine.GameManagement.Game(); + public frmCompiler() { InitializeComponent(); @@ -45,6 +47,7 @@ namespace MUDCompiler private void openScriptToolStripMenuItem_Click(object sender, EventArgs e) { rScripting.CompileEngine engine = new rScripting.CompileEngine(); + engine.Compiler = "MudScriptCompiler"; OpenFileDialog browse = new OpenFileDialog(); browse.ShowDialog(); diff --git a/MudEngine/GameManagement/CommandEngine.cs b/MudEngine/GameManagement/CommandEngine.cs index 9af0765..ac5f060 100644 --- a/MudEngine/GameManagement/CommandEngine.cs +++ b/MudEngine/GameManagement/CommandEngine.cs @@ -149,7 +149,12 @@ namespace MudEngine.GameManagement foreach (Type t in commandLibrary.GetTypes()) { - if (t.GetInterface(typeof(IGameCommand).FullName) != null) + if (t.IsAbstract) + continue; + + Type inter = t.GetInterface("IGameCommand"); + + if (inter != null) { //Use activator to create an instance IGameCommand command = (IGameCommand)Activator.CreateInstance(t); diff --git a/MudEngine/Scripting/MudScriptCompiler.cs b/MudEngine/Scripting/MudScriptCompiler.cs index 57d7169..14ebaaf 100644 --- a/MudEngine/Scripting/MudScriptCompiler.cs +++ b/MudEngine/Scripting/MudScriptCompiler.cs @@ -49,6 +49,10 @@ namespace MudEngine.Scripting /// public Dictionary CompilerOptions { get; set; } + public MudScriptCompiler() + { + } + /// /// Compiles the source files found within the scriptRepository directory matching the ICompiler.ScriptExtension /// The Compiler defaults to the C# 4.0 compiler if none other is supplied via the ICompiler.CompilerOptions argument.