2022-01-12 23:08:07 +00:00
|
|
|
|
using HarmonyLib;
|
|
|
|
|
using QSB.Patches;
|
|
|
|
|
|
|
|
|
|
namespace QSB.EyeOfTheUniverse.MaskSync.Patches
|
|
|
|
|
{
|
|
|
|
|
internal class MaskPatches : QSBPatch
|
|
|
|
|
{
|
|
|
|
|
public override QSBPatchTypes Type => QSBPatchTypes.OnClientConnect;
|
|
|
|
|
|
|
|
|
|
[HarmonyPrefix]
|
|
|
|
|
[HarmonyPatch(typeof(EyeShuttleController), nameof(EyeShuttleController.OnLaunchSlotActivated))]
|
|
|
|
|
public static bool DontLaunch(EyeShuttleController __instance)
|
|
|
|
|
{
|
|
|
|
|
if (__instance._isPlayerInside)
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
2022-01-12 21:43:57 -08:00
|
|
|
|
MaskManager.FlickerOutShuttle();
|
2022-01-12 23:08:07 +00:00
|
|
|
|
__instance.enabled = false;
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|