mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2026-08-15 13:04:36 +00:00
Allow DLLs in scripts, Update VKAPI (#1158)
* Update VKAPI * KeyBoard Update * Add Custom Libs * Change add method
This commit is contained in:
parent
beebe506d1
commit
55f8988bbc
2 changed files with 55 additions and 4 deletions
|
|
@ -51,12 +51,17 @@ namespace MinecraftClient
|
|||
List<string> script = new List<string>();
|
||||
List<string> extensions = new List<string>();
|
||||
List<string> libs = new List<string>();
|
||||
List<string> dlls = new List<string>();
|
||||
foreach (string line in lines)
|
||||
{
|
||||
if (line.StartsWith("//using"))
|
||||
{
|
||||
libs.Add(line.Replace("//", "").Trim());
|
||||
}
|
||||
else if (line.StartsWith("//dll"))
|
||||
{
|
||||
dlls.Add(line.Replace("//dll ", "").Trim());
|
||||
}
|
||||
else if (line.StartsWith("//MCCScript"))
|
||||
{
|
||||
if (line.EndsWith("Extensions"))
|
||||
|
|
@ -107,6 +112,7 @@ namespace MinecraftClient
|
|||
.Select(a => a.Location).ToArray());
|
||||
parameters.CompilerOptions = "/t:library";
|
||||
parameters.GenerateInMemory = true;
|
||||
parameters.ReferencedAssemblies.AddRange(dlls.ToArray());
|
||||
CompilerResults result = compiler.CompileAssemblyFromSource(parameters, code);
|
||||
|
||||
//Process compile warnings and errors
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue