mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
22 lines
858 B
C#
22 lines
858 B
C#
using HarmonyLib;
|
|
using NewHorizons.Utility;
|
|
|
|
namespace NewHorizons.Patches.WarpPatches
|
|
{
|
|
[HarmonyPatch(typeof(NomaiCoordinateInterface))]
|
|
public static class NomaiCoordinateInterfacePatches
|
|
{
|
|
[HarmonyPrefix]
|
|
[HarmonyPatch(nameof(NomaiCoordinateInterface.SetPillarRaised), new System.Type[] { typeof(bool) })]
|
|
public static bool NomaiCoordinateInterface_SetPillarRaised(NomaiCoordinateInterface __instance, bool raised)
|
|
{
|
|
if (raised)
|
|
return !(
|
|
!__instance._powered ||
|
|
__instance.CheckEyeCoordinates() && Main.Instance.CurrentStarSystem != "EyeOfTheUniverse" ||
|
|
__instance.CheckAllCoordinates(out var targetSystem) && Main.Instance.CurrentStarSystem != targetSystem
|
|
);
|
|
return true;
|
|
}
|
|
}
|
|
} |