mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
19 lines
784 B
C#
19 lines
784 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 string targetSystem) && Main.Instance.CurrentStarSystem != targetSystem);
|
|
return true;
|
|
}
|
|
}
|
|
}
|