public static bool Prefix(Vent __instance) { if (!VentMap.ContainsKey(__instance.Id)) { return(true); } var Custom = VentMap[__instance.Id]; __instance.CanUse(PlayerControl.LocalPlayer.Data, out var canUse, out _); if (!canUse) { return(false); } var localPlayer = PlayerControl.LocalPlayer; if (localPlayer.inVent) { localPlayer.MyPhysics.RpcExitVent(Custom.Id); Custom.SetButtons(false); } else { localPlayer.MyPhysics.RpcEnterVent(Custom.Id); Custom.SetButtons(true); } return(false); }
public static bool Prefix(Vent __instance) { if (!VentMap.ContainsKey(__instance.Id)) { return(true); } return(false); }
public static bool Prefix(Vent __instance, PlayerControl NMEAPOJFNKA) { if (!VentMap.ContainsKey(__instance.Id)) { return(true); } var Custom = VentMap[__instance.Id]; Custom.EnterVent(NMEAPOJFNKA); return(false); }