From eaedd532c7d93dec9cca5d361685ed32c85aeebb Mon Sep 17 00:00:00 2001 From: "Somhairle H. Marisol" Date: Mon, 21 Sep 2026 12:37:05 +0800 Subject: fix(desktop): 目标选择纯距离优先与 id 平局 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 情境提示目标选择改为距离最近优先(不再按门/人类型特权),平局按实体 id 升序确定唯一目标;新增门/人两侧距离优先对照、精确等距 tie、NPC 数组快照不变(resolve 与 refreshPrompt 均不突变 Npcs)回归测试;透墙与超距判定沿用既有 实现,已有边界/竞争/切换用例保持全绿。 --- src/LivingVillage.Desktop/Interaction.fs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/LivingVillage.Desktop/Interaction.fs') diff --git a/src/LivingVillage.Desktop/Interaction.fs b/src/LivingVillage.Desktop/Interaction.fs index 20ffa17..916544c 100644 --- a/src/LivingVillage.Desktop/Interaction.fs +++ b/src/LivingVillage.Desktop/Interaction.fs @@ -139,17 +139,12 @@ module InteractionResolver = candidates |> List.sortBy (fun candidate -> - let priority = - match candidate.Action with - | EnterHome _ - | ExitHome _ -> 0 - | TalkTo _ -> 1 let stableId = match candidate.Action with | TalkTo id -> npcNumber id | EnterHome(HomeId id) | ExitHome(HomeId id) -> id - priority, candidate.DistanceSquared, stableId) + candidate.DistanceSquared, stableId) |> List.tryHead let resolveAction = resolve -- cgit v1.2.3