mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-17 01:13:05 +00:00
24 lines
622 B
C#
24 lines
622 B
C#
using HarmonyLib;
|
|
using QSB.Messaging;
|
|
using QSB.Patches;
|
|
using QSB.ShipSync.Messages;
|
|
using QSB.ShipSync.WorldObjects;
|
|
using QSB.Utility;
|
|
using QSB.WorldSync;
|
|
using UnityEngine;
|
|
|
|
namespace QSB.ShipSync.Patches;
|
|
|
|
[HarmonyPatch(typeof(ShipDetachableModule))]
|
|
internal class ShipDetachableModulePatches : QSBPatch
|
|
{
|
|
public override QSBPatchTypes Type => QSBPatchTypes.OnClientConnect;
|
|
|
|
[HarmonyPostfix]
|
|
[HarmonyPatch(nameof(ShipDetachableModule.Detach))]
|
|
public static void Detach(ShipDetachableModule __instance)
|
|
{
|
|
__instance.GetWorldObject<QSBShipDetachableModule>().SendMessage(new ModuleDetachMessage());
|
|
}
|
|
}
|