- 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
@@ -18,12 +18,14 @@ using System.Reflection;
using System.Threading;
using Barotrauma.Extensions;
using System.Collections.Immutable;
using Barotrauma.LuaCs.Events;
namespace Barotrauma
{
class GameMain : Game
{
public static LuaCsSetup LuaCs;
private static LuaCsSetup _luaCs;
public static LuaCsSetup LuaCs => _luaCs ??= new LuaCsSetup();
public static bool ShowFPS;
public static bool ShowPerf;
public static bool DebugDraw;
@@ -244,8 +246,6 @@ namespace Barotrauma
throw new Exception("Content folder not found. If you are trying to compile the game from the source code and own a legal copy of the game, you can copy the Content folder from the game's files to BarotraumaShared/Content.");
}
LuaCs = new LuaCsSetup();
GameSettings.Init();
CreatureMetrics.Init();
@@ -1054,7 +1054,7 @@ namespace Barotrauma
SoundManager?.Update();
GameMain.LuaCs.Update();
LuaCs.EventService.PublishEvent<IEventUpdate>(sub => sub.OnUpdate(Timing.Step));
Timing.Accumulator -= Timing.Step;
@@ -1237,8 +1237,6 @@ namespace Barotrauma
GUIMessageBox.CloseAll();
MainMenuScreen.Select();
GameSession = null;
GameMain.LuaCs.Stop();
}
public void ShowBugReporter()