mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-30 12:32:55 +00:00
27 lines
683 B
C#
27 lines
683 B
C#
using HarmonyLib;
|
|
using QSB.EchoesOfTheEye.WineCellar.Messages;
|
|
using QSB.EchoesOfTheEye.WineCellar.WorldObjects;
|
|
using QSB.Messaging;
|
|
using QSB.Patches;
|
|
using QSB.WorldSync;
|
|
|
|
namespace QSB.EchoesOfTheEye.WineCellar.Patches;
|
|
|
|
internal class WineCellarPatches : QSBPatch
|
|
{
|
|
public override QSBPatchTypes Type => QSBPatchTypes.OnClientConnect;
|
|
|
|
[HarmonyPostfix]
|
|
[HarmonyPatch(typeof(WineCellarSwitch), nameof(WineCellarSwitch.OnPressInteract))]
|
|
public static void OnPressInteract(WineCellarSwitch __instance)
|
|
{
|
|
if (Remote)
|
|
{
|
|
return;
|
|
}
|
|
|
|
var worldObject = __instance.GetWorldObject<QSBWineCellarSwitch>();
|
|
worldObject.SendMessage(new WineCellarSwitchMessage());
|
|
}
|
|
}
|