mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-29 09:32:38 +00:00
23 lines
604 B
C#
23 lines
604 B
C#
using QSB.Events;
|
|
using QSB.Patches;
|
|
|
|
namespace QSB.ShipSync.Patches
|
|
{
|
|
class ShipPatches : QSBPatch
|
|
{
|
|
public override QSBPatchTypes Type => QSBPatchTypes.OnClientConnect;
|
|
|
|
public override void DoPatches()
|
|
=> QSBCore.HarmonyHelper.AddPrefix<HatchController>("OnPressInteract", typeof(ShipPatches), nameof(HatchController_OnPressInteract));
|
|
|
|
public override void DoUnpatches()
|
|
=> QSBCore.HarmonyHelper.Unpatch<HatchController>("OnPressInteract");
|
|
|
|
public static bool HatchController_OnPressInteract()
|
|
{
|
|
QSBEventManager.FireEvent(EventNames.QSBOpenHatch);
|
|
return true;
|
|
}
|
|
}
|
|
}
|