From 71246b18c8ab75bb17293c8252ee8cc930c21156 Mon Sep 17 00:00:00 2001 From: InvalidArgument3 Date: Thu, 31 Oct 2024 16:25:27 -0500 Subject: [PATCH] Update Session.cs --- TSTSSESHangar/Data/Scripts/FactionHangar/Session.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/TSTSSESHangar/Data/Scripts/FactionHangar/Session.cs b/TSTSSESHangar/Data/Scripts/FactionHangar/Session.cs index 37b3ace..6cc071d 100644 --- a/TSTSSESHangar/Data/Scripts/FactionHangar/Session.cs +++ b/TSTSSESHangar/Data/Scripts/FactionHangar/Session.cs @@ -2350,6 +2350,11 @@ protected override void UnloadData() { } } + // Add this unhook + if (!isDedicated) { + MyVisualScriptLogicProvider.ToolEquipped -= ToolEquipped; + } + if (MyAPIGateway.Utilities != null) { MyAPIGateway.Utilities.MessageEntered -= ChatHandler; } @@ -2358,10 +2363,6 @@ protected override void UnloadData() { MyAPIGateway.Multiplayer.UnregisterMessageHandler(NetworkHandle, Comms.MessageHandler); } - //if (!isDedicated) { - // Sandbox.ModAPI.MyAPIGateway.Utilities.ShowMessage("FactionHangar", "Mod Unloaded"); - //} - Instance = null; } catch (Exception ex) {