mirror of
https://github.com/Raicuparta/nomai-vr.git
synced 2025-12-11 20:15:08 +01:00
Update game libs to latest version, use strongly typed names in patches where possible (#493)
This commit is contained in:
parent
0b3536bdd5
commit
dbbc95e32c
@ -103,7 +103,7 @@ namespace NomaiVR.EffectFixes
|
||||
|
||||
var openEyesMethod =
|
||||
typeof(PlayerCameraEffectController)
|
||||
.GetMethod("OpenEyes", new[] { typeof(float), typeof(AnimationCurve) });
|
||||
.GetMethod(nameof(PlayerCameraEffectController.OpenEyes), new[] { typeof(float), typeof(AnimationCurve) });
|
||||
Postfix(openEyesMethod, nameof(PostOpenEyes));
|
||||
|
||||
Postfix<PlayerCameraEffectController>(nameof(PlayerCameraEffectController.CloseEyes), nameof(PostCloseEyes));
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
{
|
||||
public override void ApplyPatches()
|
||||
{
|
||||
Prefix<PlayerCharacterController>("OnPlayerDeath", nameof(PrePlayerDeath));
|
||||
Prefix<PlayerCharacterController>(nameof(PlayerCharacterController.OnPlayerDeath), nameof(PrePlayerDeath));
|
||||
}
|
||||
|
||||
private static bool PrePlayerDeath(DeathType deathType)
|
||||
|
||||
@ -22,8 +22,8 @@ namespace NomaiVR.EffectFixes
|
||||
//Mind Projectors
|
||||
Prefix<MindProjectorImageEffect>(nameof(MindProjectorImageEffect.Awake), nameof(AddVRProjector));
|
||||
Prefix<MindProjectorImageEffect>(nameof(MindProjectorImageEffect.OnRenderImage), nameof(BlitImageEffect));
|
||||
Prefix<MindProjectorImageEffect>("set_eyeOpenness", nameof(SetEyeOpennes));
|
||||
Prefix<MindProjectorImageEffect>("set_slideTexture", nameof(SetSlideTexture));
|
||||
Prefix<MindProjectorImageEffect>("set_" + nameof(MindProjectorImageEffect.eyeOpenness), nameof(SetEyeOpennes));
|
||||
Prefix<MindProjectorImageEffect>("set_" + nameof(MindProjectorImageEffect.slideTexture), nameof(SetSlideTexture));
|
||||
|
||||
//Zoom Points
|
||||
Prefix<LanternZoomPoint>(nameof(LanternZoomPoint.UpdateRetroZoom), nameof(UpdateRetrozoomFOVScale));
|
||||
|
||||
@ -14,16 +14,16 @@ namespace NomaiVR.EffectFixes
|
||||
|
||||
public override void ApplyPatches()
|
||||
{
|
||||
Prefix<Flashback>("OnTriggerFlashback", nameof(PatchTriggerFlashback));
|
||||
Prefix<Flashback>("Update", nameof(FlashbackUpdate));
|
||||
Prefix<Flashback>("UpdateMemoryUplink", nameof(PostUpdateMemoryLink));
|
||||
Postfix<Flashback>("OnTriggerMemoryUplink", nameof(PostTriggerMemoryUplink));
|
||||
Prefix<Flashback>(nameof(Flashback.OnTriggerFlashback), nameof(PatchTriggerFlashback));
|
||||
Prefix<Flashback>(nameof(Flashback.Update), nameof(FlashbackUpdate));
|
||||
Prefix<Flashback>(nameof(Flashback.UpdateMemoryUplink), nameof(PostUpdateMemoryLink));
|
||||
Postfix<Flashback>(nameof(Flashback.OnTriggerMemoryUplink), nameof(PostTriggerMemoryUplink));
|
||||
|
||||
// Prevent flashing on energy death.
|
||||
Postfix<Flashback>("OnTriggerFlashback", nameof(PostTriggerFlashback));
|
||||
Postfix<Flashback>(nameof(Flashback.OnTriggerFlashback), nameof(PostTriggerFlashback));
|
||||
|
||||
// Fix loop picture scale.
|
||||
Postfix<Flashback>("Start", nameof(PostFlashbackRecorderAwake));
|
||||
Postfix<Flashback>(nameof(Flashback.Start), nameof(PostFlashbackRecorderAwake));
|
||||
}
|
||||
|
||||
private static void PostFlashbackRecorderAwake(Transform ____screenTransform, ref Vector3 ____origScreenScale)
|
||||
|
||||
@ -11,7 +11,7 @@ namespace NomaiVR.EffectFixes
|
||||
{
|
||||
public override void ApplyPatches()
|
||||
{
|
||||
Postfix<NomaiRemoteCameraPlatform>("SwitchToRemoteCamera", nameof(SwitchToRemoteCamera));
|
||||
Postfix<NomaiRemoteCameraPlatform>(nameof(NomaiRemoteCameraPlatform.SwitchToRemoteCamera), nameof(SwitchToRemoteCamera));
|
||||
}
|
||||
|
||||
private static void SwitchToRemoteCamera(NomaiRemoteCameraPlatform ____slavePlatform, Transform ____playerHologram)
|
||||
|
||||
@ -120,7 +120,7 @@
|
||||
<EmbeddedResource Remove="Input\Bindings\**" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="OuterWildsGameLibs" Version="1.1.11.72" />
|
||||
<PackageReference Include="OuterWildsGameLibs" Version="1.1.12.125" />
|
||||
<PackageReference Include="OWML" Version="2.1.0">
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
@ -101,10 +101,10 @@ namespace NomaiVR.Player
|
||||
{
|
||||
public override void ApplyPatches()
|
||||
{
|
||||
Postfix<PlayerCharacterController>("UpdateTurning", nameof(PostCharacterTurning));
|
||||
Postfix<JetpackThrusterController>("FixedUpdate", nameof(PostThrusterUpdate));
|
||||
Prefix<OWCamera>("set_fieldOfView", nameof(PatchOwCameraFOV));
|
||||
Prefix<OWCamera>("get_fieldOfView", nameof(GetOwCameraFOVScaled));
|
||||
Postfix<PlayerCharacterController>(nameof(PlayerCharacterController.UpdateTurning), nameof(PostCharacterTurning));
|
||||
Postfix<JetpackThrusterController>(nameof(JetpackThrusterController.FixedUpdate), nameof(PostThrusterUpdate));
|
||||
Prefix<OWCamera>("set_" + nameof(OWCamera.fieldOfView), nameof(PatchOwCameraFOV));
|
||||
Prefix<OWCamera>("get_" + nameof(OWCamera.fieldOfView), nameof(GetOwCameraFOVScaled));
|
||||
}
|
||||
|
||||
private static void PostThrusterUpdate(Vector3 ____rotationalInput)
|
||||
|
||||
@ -22,21 +22,21 @@ namespace NomaiVR.Ship
|
||||
{
|
||||
public override void ApplyPatches()
|
||||
{
|
||||
Postfix<ShipBody>("Start", nameof(ShipStart));
|
||||
Postfix<ShipBody>(nameof(ShipBody.Start), nameof(ShipStart));
|
||||
Prefix<ReferenceFrameTracker>(nameof(ReferenceFrameTracker.FindReferenceFrameInLineOfSight), nameof(PreFindFrame));
|
||||
Postfix<ReferenceFrameTracker>(nameof(ReferenceFrameTracker.FindReferenceFrameInLineOfSight), nameof(PostFindFrame));
|
||||
Prefix<ReferenceFrameTracker>(nameof(ReferenceFrameTracker.FindReferenceFrameInMapView), nameof(PreFindFrame));
|
||||
Postfix<ReferenceFrameTracker>(nameof(ReferenceFrameTracker.FindReferenceFrameInMapView), nameof(PostFindFrame));
|
||||
Empty<PlayerCameraController>("OnEnterLandingView");
|
||||
Empty<PlayerCameraController>("OnExitLandingView");
|
||||
Empty<PlayerCameraController>("OnEnterShipComputer");
|
||||
Empty<PlayerCameraController>("OnExitShipComputer");
|
||||
Prefix<ShipCockpitController>("EnterLandingView", nameof(PreEnterLandingView));
|
||||
Prefix<ShipCockpitController>("ExitLandingView", nameof(PreExitLandingView));
|
||||
Postfix<ShipCockpitController>("ExitFlightConsole", nameof(PostExitFlightConsole));
|
||||
Prefix<ShipCockpitUI>("Update", nameof(PreCockpitUIUpdate));
|
||||
Postfix<ShipCockpitUI>("Update", nameof(PostCockpitUIUpdate));
|
||||
Prefix(typeof(ReferenceFrameTracker).GetMethod("UntargetReferenceFrame", new[] { typeof(bool) }), nameof(PreUntargetFrame));
|
||||
Empty<PlayerCameraController>(nameof(PlayerCameraController.OnEnterLandingView));
|
||||
Empty<PlayerCameraController>(nameof(PlayerCameraController.OnExitLandingView));
|
||||
Empty<PlayerCameraController>(nameof(PlayerCameraController.OnEnterShipComputer));
|
||||
Empty<PlayerCameraController>(nameof(PlayerCameraController.OnExitShipComputer));
|
||||
Prefix<ShipCockpitController>(nameof(ShipCockpitController.EnterLandingView), nameof(PreEnterLandingView));
|
||||
Prefix<ShipCockpitController>(nameof(ShipCockpitController.ExitLandingView), nameof(PreExitLandingView));
|
||||
Postfix<ShipCockpitController>(nameof(ShipCockpitController.ExitFlightConsole), nameof(PostExitFlightConsole));
|
||||
Prefix<ShipCockpitUI>(nameof(ShipCockpitUI.Update), nameof(PreCockpitUIUpdate));
|
||||
Postfix<ShipCockpitUI>(nameof(ShipCockpitUI.Update), nameof(PostCockpitUIUpdate));
|
||||
Prefix(typeof(ReferenceFrameTracker).GetMethod(nameof(ReferenceFrameTracker.UntargetReferenceFrame), new[] { typeof(bool) }), nameof(PreUntargetFrame));
|
||||
}
|
||||
|
||||
private static void PreCockpitUIUpdate(ShipCockpitUI __instance)
|
||||
|
||||
@ -119,10 +119,10 @@ namespace NomaiVR.Tools
|
||||
public override void ApplyPatches()
|
||||
{
|
||||
// Stop stick rotation animation.
|
||||
Empty<RoastingStickController>("UpdateRotation");
|
||||
Empty<RoastingStickController>(nameof(RoastingStickController.UpdateRotation));
|
||||
|
||||
// Prevent stick from moving on colliding with stuff.
|
||||
Postfix<RoastingStickController>("CalculateMaxStickExtension", nameof(PostCalculateMaxStickExtension));
|
||||
Postfix<RoastingStickController>(nameof(RoastingStickController.CalculateMaxStickExtension), nameof(PostCalculateMaxStickExtension));
|
||||
}
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE0060:Remove unused parameter", Justification = "Result required for return passthrough")]
|
||||
|
||||
@ -153,15 +153,15 @@ namespace NomaiVR.Tools
|
||||
|
||||
public override void ApplyPatches()
|
||||
{
|
||||
Prefix<PlayerSpacesuit>("SuitUp", nameof(SuitUp));
|
||||
Prefix<PlayerSpacesuit>("RemoveSuit", nameof(RemoveSuit));
|
||||
Postfix<ProbeLauncherUI>("HideProbeHUD", nameof(PostHideHUD));
|
||||
Prefix<PlayerSpacesuit>(nameof(PlayerSpacesuit.SuitUp), nameof(SuitUp));
|
||||
Prefix<PlayerSpacesuit>(nameof(PlayerSpacesuit.RemoveSuit), nameof(RemoveSuit));
|
||||
Postfix<ProbeLauncherUI>(nameof(ProbeLauncherUI.HideProbeHUD), nameof(PostHideHUD));
|
||||
|
||||
// Prevent probe prompt zones from equipping / unequipping the probe launcher.
|
||||
Prefix<ProbePromptReceiver>("LoseFocus", nameof(PreLoseFocus));
|
||||
Postfix<ProbePromptReceiver>("LoseFocus", nameof(PostLoseFocus));
|
||||
Prefix<ProbePromptReceiver>("GainFocus", nameof(PreGainFocus));
|
||||
Postfix<ProbePromptReceiver>("GainFocus", nameof(PostGainFocus));
|
||||
Prefix<ProbePromptReceiver>(nameof(ProbePromptReceiver.LoseFocus), nameof(PreLoseFocus));
|
||||
Postfix<ProbePromptReceiver>(nameof(ProbePromptReceiver.LoseFocus), nameof(PostLoseFocus));
|
||||
Prefix<ProbePromptReceiver>(nameof(ProbePromptReceiver.GainFocus), nameof(PreGainFocus));
|
||||
Postfix<ProbePromptReceiver>(nameof(ProbePromptReceiver.GainFocus), nameof(PostGainFocus));
|
||||
}
|
||||
|
||||
private static void PreLoseFocus()
|
||||
|
||||
@ -175,9 +175,9 @@ namespace NomaiVR.Tools
|
||||
{
|
||||
public override void ApplyPatches()
|
||||
{
|
||||
Postfix<ToolModeSwapper>("IsTranslatorEquipPromptAllowed", nameof(IsPromptAllowed));
|
||||
Postfix<ToolModeSwapper>("GetAutoEquipTranslator", nameof(IsPromptAllowed));
|
||||
Postfix<ToolModeSwapper>("IsNomaiTextInFocus", nameof(IsPromptAllowed));
|
||||
Postfix<ToolModeSwapper>(nameof(ToolModeSwapper.IsTranslatorEquipPromptAllowed), nameof(IsPromptAllowed));
|
||||
Postfix<ToolModeSwapper>(nameof(ToolModeSwapper.GetAutoEquipTranslator), nameof(IsPromptAllowed));
|
||||
Postfix<ToolModeSwapper>(nameof(ToolModeSwapper.IsNomaiTextInFocus), nameof(IsPromptAllowed));
|
||||
}
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE0060:Remove unused parameter", Justification = "Unusued parameter is needed for return value passthrough.")]
|
||||
|
||||
@ -70,8 +70,8 @@ namespace NomaiVR.Tools
|
||||
{
|
||||
public override void ApplyPatches()
|
||||
{
|
||||
Prefix<ToolModeSwapper>("EquipToolMode", nameof(PreEquipTool));
|
||||
Prefix<ShipCockpitController>("OnPressInteract", nameof(PreShipCockpitController));
|
||||
Prefix<ToolModeSwapper>(nameof(ToolModeSwapper.EquipToolMode), nameof(PreEquipTool));
|
||||
Prefix<ShipCockpitController>(nameof(ShipCockpitController.OnPressInteract), nameof(PreShipCockpitController));
|
||||
}
|
||||
|
||||
private static void PreShipCockpitController()
|
||||
|
||||
@ -49,11 +49,11 @@ namespace NomaiVR.UI
|
||||
{
|
||||
public override void ApplyPatches()
|
||||
{
|
||||
Prefix<CharacterDialogueTree>("StartConversation", nameof(PreStartConversation));
|
||||
Postfix<CharacterDialogueTree>("StartConversation", nameof(PostStartConversation));
|
||||
Prefix<CharacterDialogueTree>("EndConversation", nameof(PreEndConversation));
|
||||
Postfix<DialogueOptionUI>("Awake", nameof(PostDialogueOptionAwake));
|
||||
Postfix<DialogueOptionUI>("SetSelected", nameof(PreSetButtonPromptImage));
|
||||
Prefix<CharacterDialogueTree>(nameof(CharacterDialogueTree.StartConversation), nameof(PreStartConversation));
|
||||
Postfix<CharacterDialogueTree>(nameof(CharacterDialogueTree.StartConversation), nameof(PostStartConversation));
|
||||
Prefix<CharacterDialogueTree>(nameof(CharacterDialogueTree.EndConversation), nameof(PreEndConversation));
|
||||
Postfix<DialogueOptionUI>(nameof(DialogueOptionUI.Awake), nameof(PostDialogueOptionAwake));
|
||||
Postfix<DialogueOptionUI>(nameof(DialogueOptionUI.SetSelected), nameof(PreSetButtonPromptImage));
|
||||
}
|
||||
|
||||
private static void PreSetButtonPromptImage(Image ____buttonPromptImage)
|
||||
|
||||
@ -253,7 +253,7 @@ namespace NomaiVR.UI
|
||||
{
|
||||
public override void ApplyPatches()
|
||||
{
|
||||
Postfix<ToolModeUI>("Update", nameof(PostToolModeUiUpdate));
|
||||
Postfix<ToolModeUI>(nameof(ToolModeUI.Update), nameof(PostToolModeUiUpdate));
|
||||
}
|
||||
|
||||
private static void PostToolModeUiUpdate(
|
||||
|
||||
@ -146,9 +146,9 @@ namespace NomaiVR.UI
|
||||
{
|
||||
public override void ApplyPatches()
|
||||
{
|
||||
Postfix<ThrustAndAttitudeIndicator>("LateUpdate", nameof(FixThrusterHudRotation));
|
||||
Postfix<HUDCamera>("Awake", nameof(FixHudDistortion));
|
||||
Postfix<HUDCamera>("OnGraphicSettingsUpdated", nameof(FixHudDistortion));
|
||||
Postfix<ThrustAndAttitudeIndicator>(nameof(ThrustAndAttitudeIndicator.LateUpdate), nameof(FixThrusterHudRotation));
|
||||
Postfix<HUDCamera>(nameof(HUDCamera.Awake), nameof(FixHudDistortion));
|
||||
Postfix<HUDCamera>(nameof(HUDCamera.OnGraphicSettingsUpdated), nameof(FixHudDistortion));
|
||||
}
|
||||
|
||||
private static void FixHudDistortion(Camera ____camera)
|
||||
|
||||
@ -106,17 +106,17 @@ namespace NomaiVR.UI
|
||||
{
|
||||
public override void ApplyPatches()
|
||||
{
|
||||
var lockOnMethods = typeof(PlayerLockOnTargeting).GetMethods().Where(method => method.Name == "LockOn");
|
||||
var lockOnMethods = typeof(PlayerLockOnTargeting).GetMethods().Where(method => method.Name == nameof(PlayerLockOnTargeting.LockOn));
|
||||
foreach (var method in lockOnMethods)
|
||||
{
|
||||
Prefix(method, nameof(PreLockOn));
|
||||
}
|
||||
var breakLockMethods = typeof(PlayerLockOnTargeting).GetMethods().Where(method => method.Name == "BreakLock");
|
||||
var breakLockMethods = typeof(PlayerLockOnTargeting).GetMethods().Where(method => method.Name == nameof(PlayerLockOnTargeting.BreakLock));
|
||||
foreach (var method in breakLockMethods)
|
||||
{
|
||||
Prefix(method, nameof(PreBreakLock));
|
||||
}
|
||||
Postfix(typeof(OWTime).GetMethod("Pause"), nameof(PostPause));
|
||||
Postfix(typeof(OWTime).GetMethod(nameof(OWTime.Pause)), nameof(PostPause));
|
||||
}
|
||||
|
||||
public static void PostPause(OWTime.PauseType pauseType)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user