mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Merge branch 'slide-reel-streaming' into profiler
This commit is contained in:
commit
89a58c2a93
@ -158,6 +158,7 @@ public class NHSlideCollection : SlideCollection
|
|||||||
_pathsBeingLoaded.Remove(path);
|
_pathsBeingLoaded.Remove(path);
|
||||||
if (_shipLogSlideProjector == null)
|
if (_shipLogSlideProjector == null)
|
||||||
{
|
{
|
||||||
|
// Object.FindObjectOfType doesnt work with inactive
|
||||||
_shipLogSlideProjector = Resources.FindObjectsOfTypeAll<ShipLogSlideProjector>().FirstOrDefault();
|
_shipLogSlideProjector = Resources.FindObjectsOfTypeAll<ShipLogSlideProjector>().FirstOrDefault();
|
||||||
}
|
}
|
||||||
if (_shipLogSlideProjector != null)
|
if (_shipLogSlideProjector != null)
|
||||||
|
|||||||
@ -5,6 +5,8 @@ namespace NewHorizons.Patches.ToolPatches
|
|||||||
[HarmonyPatch(typeof(ToolModeSwapper))]
|
[HarmonyPatch(typeof(ToolModeSwapper))]
|
||||||
public static class ToolModeSwapperPatches
|
public static class ToolModeSwapperPatches
|
||||||
{
|
{
|
||||||
|
private static ShipCockpitController _shipCockpitController;
|
||||||
|
|
||||||
// Patches ToolModeSwapper.EquipToolMode(ToolMode mode) to deny swaps if you're holding a vision torch.
|
// Patches ToolModeSwapper.EquipToolMode(ToolMode mode) to deny swaps if you're holding a vision torch.
|
||||||
// This is critical for preventing swapping to the scout launcher (causes memory slides to fail) but it
|
// This is critical for preventing swapping to the scout launcher (causes memory slides to fail) but it
|
||||||
// just doesn't look right when you switch to other stuff (eg the signalscope), so I'm disabling swapping tools entirely
|
// just doesn't look right when you switch to other stuff (eg the signalscope), so I'm disabling swapping tools entirely
|
||||||
@ -21,7 +23,9 @@ namespace NewHorizons.Patches.ToolPatches
|
|||||||
mode == ToolMode.Probe ||
|
mode == ToolMode.Probe ||
|
||||||
mode == ToolMode.SignalScope ||
|
mode == ToolMode.SignalScope ||
|
||||||
mode == ToolMode.Translator;
|
mode == ToolMode.Translator;
|
||||||
var isInShip = UnityEngine.Object.FindObjectOfType<ShipCockpitController>()?._playerAtFlightConsole ?? false;
|
if (_shipCockpitController == null)
|
||||||
|
_shipCockpitController = UnityEngine.Object.FindObjectOfType<ShipCockpitController>();
|
||||||
|
var isInShip = _shipCockpitController != null ? _shipCockpitController._playerAtFlightConsole : false;
|
||||||
|
|
||||||
if (!isInShip && isHoldingVisionTorch && swappingToRestrictedTool) return false;
|
if (!isInShip && isHoldingVisionTorch && swappingToRestrictedTool) return false;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user