Corrected error causing CommandEngine commands to not work.
This commit is contained in:
parent
7bc89b294b
commit
974cc0f9b8
3 changed files with 13 additions and 1 deletions
|
@ -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();
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -49,6 +49,10 @@ namespace MudEngine.Scripting
|
|||
/// </summary>
|
||||
public Dictionary<String, String> CompilerOptions { get; set; }
|
||||
|
||||
public MudScriptCompiler()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue