From 5914f02d0999ea14f27e2ab93e51bbe1cb088f6f Mon Sep 17 00:00:00 2001 From: Soar Qin Date: Fri, 6 Feb 2026 18:04:28 +0800 Subject: [PATCH] minor changes to prevent mecha from flying --- UXAssist/Patches/FactoryPatch.cs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/UXAssist/Patches/FactoryPatch.cs b/UXAssist/Patches/FactoryPatch.cs index 98984dc..396ad66 100644 --- a/UXAssist/Patches/FactoryPatch.cs +++ b/UXAssist/Patches/FactoryPatch.cs @@ -316,12 +316,8 @@ public class FactoryPatch : PatchImpl if (prebuildCount <= 0) return; if (!AutoConstructEnabled.Value) return; var player = __instance.player; + if (prebuildCount <= player.mecha.constructionModule.buildTargetTotalCount) return; if (player.orders.orderCount > 0) return; - if (player.movementState == EMovementState.Walk && player.mecha.thrusterLevel >= 1) - { - player.controller.actionWalk.SwitchToFly(); - return; - } var prebuilds = factory.prebuildPool; var minDist = float.MaxValue; var minIndex = 0; @@ -343,6 +339,11 @@ public class FactoryPatch : PatchImpl } if (minIndex == 0) return; if ((prebuilds[minIndex].pos - playerPos).sqrMagnitude < 400f) return; + if (player.movementState == EMovementState.Walk && player.mecha.thrusterLevel >= 1) + { + player.controller.actionWalk.SwitchToFly(); + return; + } player.Order(OrderNode.MoveTo(prebuilds[minIndex].pos), false); } #endregion