- Finished most of LuaCsSetup top-level functionality.

- Removed some unneeded interface definitions.
- Clean-slated some Services that need to be re-written.
This commit is contained in:
MapleWheels
2025-02-14 12:34:59 -05:00
committed by Maplewheels
parent d2b9ca4c1b
commit 7436ea3e8c
39 changed files with 1009 additions and 2045 deletions
@@ -13,6 +13,7 @@ using System.Xml.Linq;
using MoonSharp.Interpreter;
using System.Net;
using Barotrauma.Extensions;
using Barotrauma.LuaCs.Events;
namespace Barotrauma
{
@@ -34,7 +35,8 @@ namespace Barotrauma
set { world = value; }
}
public static LuaCsSetup LuaCs;
private static LuaCsSetup _luaCs;
public static LuaCsSetup LuaCs => _luaCs ??= new LuaCsSetup();
public static GameServer Server;
public static NetworkMember NetworkMember
@@ -364,7 +366,7 @@ namespace Barotrauma
TaskPool.Update();
CoroutineManager.Update(paused: false, (float)Timing.Step);
GameMain.LuaCs.Update();
LuaCs.EventService.PublishEvent<IEventUpdate>(sub => sub.OnUpdate(Timing.Step));
performanceCounterTimer.Stop();
if (GameMain.LuaCs.PerformanceCounter.EnablePerformanceCounter)
{