Converting everything into Harmony patches part 1

This commit is contained in:
Evil Factory
2026-02-09 21:54:44 -03:00
parent d14c353115
commit fb4648d759
14 changed files with 236 additions and 68 deletions
@@ -297,6 +297,8 @@ namespace Barotrauma
MainThread = Thread.CurrentThread;
Window.FileDropped += OnFileDropped;
LuaCs.GetType();
}
public static void ExecuteAfterContentFinishedLoading(Action action)
@@ -1051,9 +1053,6 @@ namespace Barotrauma
SoundManager?.Update();
LuaCs.EventService.PublishEvent<IEventUpdate>(sub => sub.OnUpdate(Timing.Step));
LuaCs.Logger.ProcessLogs();
Timing.Accumulator -= Timing.Step;
updateCount++;
@@ -7,11 +7,11 @@ using System.Collections.Generic;
namespace Barotrauma.LuaCs;
partial class NetworkingService : INetworkingService, IEventConnectedToServer, IEventServerRawNetMessageReceived
partial class NetworkingService : INetworkingService, IEventServerConnected, IEventServerRawNetMessageReceived
{
private ConcurrentDictionary<ushort, ConcurrentQueue<IReadMessage>> receiveQueue = new();
public void OnConnectedToServer()
public void OnServerConnected()
{
SendSyncMessage();
}
@@ -495,8 +495,6 @@ namespace Barotrauma
allowInput = true;
}
GameMain.LuaCs.Hook.Call("keyUpdate", deltaTime);
oldMouseState = mouseState;
mouseState = latestMouseState;
UpdateVariable();
@@ -1532,8 +1532,6 @@ namespace Barotrauma
public override void Select()
{
Select(enableAutoSave: true);
GameMain.LuaCs.EventService.PublishEvent<IEventScreenSelected>(sub => sub.OnScreenSelected(this));
}
public void Select(bool enableAutoSave = true)