- 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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user