From ad152ee74715d44c2b4f6ecbc2bcac61abf1ef54 Mon Sep 17 00:00:00 2001 From: MapleWheels Date: Wed, 11 Feb 2026 15:19:40 -0500 Subject: [PATCH] - pOoosh --- .../BarotraumaShared/SharedSource/LuaCs/LuaCsSetup.cs | 2 -- .../LuaCs/_Services/HarmonyEventPatchesService.cs | 6 ++---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/Barotrauma/BarotraumaShared/SharedSource/LuaCs/LuaCsSetup.cs b/Barotrauma/BarotraumaShared/SharedSource/LuaCs/LuaCsSetup.cs index 3ebfdd402..9964cf269 100644 --- a/Barotrauma/BarotraumaShared/SharedSource/LuaCs/LuaCsSetup.cs +++ b/Barotrauma/BarotraumaShared/SharedSource/LuaCs/LuaCsSetup.cs @@ -30,9 +30,7 @@ namespace Barotrauma // == startup _servicesProvider = SetupServicesProvider(); _runStateMachine = SetupStateMachine(); - _servicesProvider.GetService(); - SubscribeToLuaCsEvents(); } diff --git a/Barotrauma/BarotraumaShared/SharedSource/LuaCs/_Services/HarmonyEventPatchesService.cs b/Barotrauma/BarotraumaShared/SharedSource/LuaCs/_Services/HarmonyEventPatchesService.cs index 22186a47e..916858880 100644 --- a/Barotrauma/BarotraumaShared/SharedSource/LuaCs/_Services/HarmonyEventPatchesService.cs +++ b/Barotrauma/BarotraumaShared/SharedSource/LuaCs/_Services/HarmonyEventPatchesService.cs @@ -62,9 +62,7 @@ internal class HarmonyEventPatchesService : IService { _eventService.PublishEvent(sub => sub.OnEnabledPackageListChanged(EnabledPackages.Core, EnabledPackages.Regular)); } - - - + #if CLIENT [HarmonyPatch(typeof(GameClient), "ReadDataMessage"), HarmonyPrefix] public static void GameClient_ReadDataMessage_Pre(IReadMessage inc) @@ -126,7 +124,7 @@ internal class HarmonyEventPatchesService : IService public void Dispose() { - Harmony.UnpatchSelf(); IsDisposed = true; + Harmony.UnpatchSelf(); } }