first commit

This commit is contained in:
2025-07-06 00:23:46 +02:00
commit 38f50c8819
1788 changed files with 112878 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
using System.Reflection;
using NitroxModel.Helper;
namespace NitroxPatcher.Patches.Dynamic;
public sealed partial class CyclopsHelmHUDManager_Update_Patch : NitroxPatch, IDynamicPatch
{
public static readonly MethodInfo TARGET_METHOD = Reflect.Method((CyclopsHelmHUDManager t) => t.Update());
public static void Postfix(CyclopsHelmHUDManager __instance)
{
// To show the Cyclops HUD every time "hudActive" have to be true. "hornObject" is a good indicator to check if the player piloting the cyclops.
if (!__instance.hornObject.activeSelf && __instance.hudActive)
{
__instance.canvasGroup.interactable = false;
}
else if (!__instance.hudActive)
{
__instance.hudActive = true;
}
if (__instance.subLiveMixin.IsAlive())
{
if (__instance.motorMode.engineOn)
{
__instance.engineToggleAnimator.SetTrigger("EngineOn");
}
else
{
__instance.engineToggleAnimator.SetTrigger("EngineOff");
}
}
}
}