public static bool Prefix(BulkheadDoor __instance, GUIHand hand) { if (IBA_Config.Enable) { Vector3 position = Player.main.transform.position; __instance.GetInstanceMethod("ToggleImmediately").Invoke(__instance, null); Player.main.transform.position = position; Logger.Log("Bulkhead animation skipped!"); return(false); } else { return(true); } }
public static bool Prefix(BulkheadDoor __instance, GUIHand hand) { try { if (IBA_Config.Enable) { Vector3 position = Player.main.transform.position; __instance.GetInstanceMethod("ToggleImmediately").Invoke(__instance, null); Player.main.transform.position = position; Logger.Log("Bulkhead animation skipped!", QMod.assembly); return(false); } else { return(true); } } catch (Exception e) { Logger.Exception(e, LoggedWhen.InPatch, QMod.assembly); return(false); } }