MudEngine:

- Script Engine now compiles scripts as C# 4.0 Types instead of 3.5. Scripts can now use Dynamic Types.

MudGame:
 - CommandCreate script added. Provides Admins the ability to create Realms and Zones from within the game during runtime. At the moment Realm creation and Zone creation (and placement within Realms) is implemented.
This commit is contained in:
Scionwest_cp 2010-08-15 14:57:41 -07:00
parent 93a27ca75f
commit 3110b74b58
5 changed files with 187 additions and 1 deletions

View file

@ -169,7 +169,7 @@ namespace MudEngine.Scripting
//Prepare the compiler.
Dictionary<String, String> providerOptions = new Dictionary<String,String>();
providerOptions.Add("CompilerVersion", "v3.5");
providerOptions.Add("CompilerVersion", "v4.0");
CompilerParameters param = new CompilerParameters(new String[] {"mscorlib.dll", "System.dll", "MudEngine.dll"});
param.GenerateExecutable = false;
@ -182,6 +182,7 @@ namespace MudEngine.Scripting
//Compile the scripts with the C# CodeProvider
CSharpCodeProvider codeProvider = new CSharpCodeProvider(providerOptions);
//codeProvider.LanguageOptions = LanguageOptions.CaseInsensitive;
CompilerResults results = new CompilerResults(new TempFileCollection());
scripts = Directory.GetFiles(ScriptPath, "*" + ScriptExtension, SearchOption.AllDirectories);
results = codeProvider.CompileAssemblyFromFile(param, scripts);