Fix Disappearing Signalscope UI #934 after warping to new system wearing suit

This commit is contained in:
xen-42 2024-10-02 23:36:32 -04:00
parent 95bd1f78e2
commit 95cd20fca7

View File

@ -4,6 +4,7 @@ using NewHorizons.Utility;
using NewHorizons.Utility.OuterWilds; using NewHorizons.Utility.OuterWilds;
using NewHorizons.Utility.OWML; using NewHorizons.Utility.OWML;
using System; using System;
using System.Collections;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;
using UnityEngine; using UnityEngine;
@ -87,8 +88,22 @@ namespace NewHorizons.Builder.General
handler.Method.Invoke(handler.Target, new object[] { command }); handler.Method.Invoke(handler.Target, new object[] { command });
} }
spv._interactVolume._listInteractions.First(x => x.promptText == UITextType.SuitUpPrompt).interactionEnabled = true; spv._interactVolume._listInteractions.First(x => x.promptText == UITextType.SuitUpPrompt).interactionEnabled = true;
// Fix Disappearing Signalscope UI #934 after warping to new system wearing suit
Delay.StartCoroutine(SignalScopeZoomCoroutine());
} }
} }
} }
private static IEnumerator SignalScopeZoomCoroutine()
{
while (!Locator.GetToolModeSwapper().GetSignalScope().InZoomMode())
{
yield return new WaitForEndOfFrame();
}
yield return null;
Locator.GetToolModeSwapper().GetSignalScope().ExitSignalscopeZoom();
Locator.GetToolModeSwapper().GetSignalScope().EnterSignalscopeZoom();
}
} }
} }