mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-03 17:38:30 +00:00
29 lines
742 B
C#
29 lines
742 B
C#
using HarmonyLib;
|
|
using QSB.Events;
|
|
using QSB.Patches;
|
|
|
|
namespace QSB.SatelliteSync.Patches
|
|
{
|
|
[HarmonyPatch]
|
|
class SatelliteProjectorPatches : QSBPatch
|
|
{
|
|
public override QSBPatchTypes Type => QSBPatchTypes.OnClientConnect;
|
|
|
|
[HarmonyPrefix]
|
|
[HarmonyPatch(typeof(SatelliteSnapshotController), nameof(SatelliteSnapshotController.OnPressInteract))]
|
|
public static bool UseProjector()
|
|
{
|
|
QSBEventManager.FireEvent(EventNames.QSBEnterSatelliteCamera);
|
|
return true;
|
|
}
|
|
|
|
[HarmonyPrefix]
|
|
[HarmonyPatch(typeof(SatelliteSnapshotController), nameof(SatelliteSnapshotController.TurnOffProjector))]
|
|
public static bool LeaveProjector()
|
|
{
|
|
QSBEventManager.FireEvent(EventNames.QSBExitSatelliteCamera);
|
|
return true;
|
|
}
|
|
}
|
|
}
|