public static void Postfix(GameObject interactiveObject, ref string __result) { if (interactiveObject == null) { return; } Repairable repairable = interactiveObject.GetComponent <Repairable>(); if (repairable != null) { __result = repairable.GetInteractiveObjectDisplayText(); } }
public static bool Prefix(PlayerManager __instance, ref bool __result) { if (__instance.m_PickupGearItem || GameManager.GetPlayerAnimationComponent().GetState() == PlayerAnimation.State.Throwing || GameManager.GetPlayerManagerComponent().GetControlMode() == PlayerControlMode.InConversation) { return(true); } if (__instance.m_InteractiveObjectUnderCrosshair == null) { return(true); } Repairable repairable = __instance.m_InteractiveObjectUnderCrosshair.GetComponent <Repairable>(); if (repairable != null) { __result = repairable.ProcessInteraction(); return(false); } return(true); }