From c537d2f796afb1c20202e9b8ef5c43cca7c71bef Mon Sep 17 00:00:00 2001 From: tanghai Date: Sat, 10 Nov 2018 14:54:28 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3#r=E6=8C=87=E4=BB=A4=E4=B8=8D?= =?UTF-8?q?=E8=83=BD=E4=BD=BF=E7=94=A8=E7=9B=B8=E5=AF=B9=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Server/Hotfix/Module/Repl/ReplComponentSystem.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Server/Hotfix/Module/Repl/ReplComponentSystem.cs b/Server/Hotfix/Module/Repl/ReplComponentSystem.cs index 420d1f90..ad0ddd25 100644 --- a/Server/Hotfix/Module/Repl/ReplComponentSystem.cs +++ b/Server/Hotfix/Module/Repl/ReplComponentSystem.cs @@ -12,9 +12,11 @@ namespace ETHotfix { public override void Start(ReplComponent self) { - self.ScriptOptions = ScriptOptions.Default.WithFilePath(Environment.CurrentDirectory) - .AddReferences(typeof (ReplComponent).Assembly); - + self.ScriptOptions = ScriptOptions.Default + .WithMetadataResolver(ScriptMetadataResolver.Default.WithBaseDirectory(Environment.CurrentDirectory)) + .AddReferences(typeof (ReplComponent).Assembly) + .AddImports("System"); + self.Run().NoAwait(); } } @@ -48,7 +50,7 @@ namespace ETHotfix line = line.Trim(); - if (line == "quit") + if (line == "exit") { self.ScriptState = null; continue; -- GitLab