summaryrefslogtreecommitdiff
path: root/src/LivingVillage.Desktop/Interaction.fs
diff options
context:
space:
mode:
authorSomhairle H. Marisol <[email protected]>2026-09-21 12:37:05 +0800
committerSomhairle H. Marisol <[email protected]>2026-09-21 12:37:05 +0800
commiteaedd532c7d93dec9cca5d361685ed32c85aeebb (patch)
tree15b0ac0769bd8add372fa010fdcf5d0504b0f979 /src/LivingVillage.Desktop/Interaction.fs
parent1401000ed8626a6eeb30d6b9f0d70224bd869b0a (diff)
downloadliving-village-eaedd532c7d93dec9cca5d361685ed32c85aeebb.tar.gz
fix(desktop): 目标选择纯距离优先与 id 平局
情境提示目标选择改为距离最近优先(不再按门/人类型特权),平局按实体 id 升序确定唯一目标;新增门/人两侧距离优先对照、精确等距 tie、NPC 数组快照不变(resolve 与 refreshPrompt 均不突变 Npcs)回归测试;透墙与超距判定沿用既有 实现,已有边界/竞争/切换用例保持全绿。
Diffstat (limited to 'src/LivingVillage.Desktop/Interaction.fs')
-rw-r--r--src/LivingVillage.Desktop/Interaction.fs7
1 files changed, 1 insertions, 6 deletions
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