Some initial CSharp scripting functionality

This commit is contained in:
Oiltanker
2022-04-09 20:47:55 +03:00
parent 86a88c6e20
commit 429557ad7d
12 changed files with 466 additions and 1 deletions
@@ -86,6 +86,8 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Scripting" Version="4.1.0" />
<PackageReference Include="MonoMod.Common" Version="22.1.20.1" />
<PackageReference Include="RestSharp" Version="106.13.0" />
</ItemGroup>
@@ -35,6 +35,7 @@ namespace Barotrauma
}
public static LuaSetup Lua;
public static NetSetup Net;
public static GameServer Server;
public static NetworkMember NetworkMember
@@ -121,6 +122,8 @@ namespace Barotrauma
CheckContentPackage();
Lua = new LuaSetup();
Net = new NetSetup();
Net.Execute();
}
@@ -349,6 +352,7 @@ namespace Barotrauma
GameMain.Lua.Update();
GameMain.Lua.hook.Call("think", new object[] { });
GameMain.Net.Update();
performanceCounterTimer.Stop();
LuaTimer.LastUpdateTime = performanceCounterTimer.ElapsedMilliseconds;
performanceCounterTimer.Reset();
@@ -82,7 +82,9 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="MonoMod.Common" Version="22.3.24.1" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.1.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Scripting" Version="4.1.0" />
<PackageReference Include="MonoMod.Common" Version="22.1.20.1" />
<PackageReference Include="RestSharp" Version="106.13.0" />
</ItemGroup>