From b4f0cebc1d08be206f127d4fedf567f5bd98d8c3 Mon Sep 17 00:00:00 2001
From: Ding Yuntian <1491671119@qq.com>
Date: Thu, 16 Jul 2026 18:50:00 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20=E6=8F=92=E5=AD=94=E6=89=93=E5=BC=80?=
=?UTF-8?q?=E6=97=B6=E6=9C=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../FixSystemNew/Screen System/FixPanel/CablePanel.cs | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/Assets/Scripts/FixSystemNew/Screen System/FixPanel/CablePanel.cs b/Assets/Scripts/FixSystemNew/Screen System/FixPanel/CablePanel.cs
index 8bbb50e71..455773e89 100644
--- a/Assets/Scripts/FixSystemNew/Screen System/FixPanel/CablePanel.cs
+++ b/Assets/Scripts/FixSystemNew/Screen System/FixPanel/CablePanel.cs
@@ -271,6 +271,7 @@ namespace AibisDream.FixSystem
physicCableRef.SetPointer(pointerWorldPos);
}
+ /// 拖拽中根据与模块距离设置/清除线缆吸附目标;不控制插孔盖开合。
public void UpdateDragProximity(Vector3 pointerWorldPos)
{
if (physicCableRef == null || BodyModuleSystem?.BodyModules == null)
@@ -282,16 +283,15 @@ namespace AibisDream.FixSystem
float assistRange = Mathf.Max(snapRange, snapRange * dragAssistRangeMultiplier);
if (TryFindClosestModuleWithin(pointerWorldPos, assistRange, out var targetModule))
{
- targetModule.OpenPlugSlot();
- BodyModuleSystem.CloseModuleSlots(targetModule);
physicCableRef.SetDragAssistTarget(targetModule.GetSocketPos(), assistRange);
}
else
{
- ClearDragHighlight();
+ physicCableRef.ClearDragAssistTarget();
}
}
+ /// 结束拖拽:清除吸附并关闭所有插孔盖。
public void ClearDragHighlight()
{
physicCableRef?.ClearDragAssistTarget();
@@ -321,9 +321,7 @@ namespace AibisDream.FixSystem
/// 是否能找到目标范围内的Module
public bool TryFindClosestModule(Vector3 sourcePos, out BodyModule targetModule)
{
- var res = BodyModuleSystem.TryFindClosestModule(sourcePos, out targetModule);
- BodyModuleSystem.CloseModuleSlots(targetModule);
- return res;
+ return BodyModuleSystem.TryFindClosestModule(sourcePos, out targetModule);
}
private bool TryFindClosestModuleWithin(Vector3 sourcePos, float range, out BodyModule targetModule)