From bc3058d1f6af39c03d5284d1141285fed38f0fe9 Mon Sep 17 00:00:00 2001 From: Jarlyyn Date: Mon, 20 Apr 2026 14:47:12 +0800 Subject: [PATCH] update --- code/HellMapManager/Helpers/Mapper.cs | 10 +++++++--- code/HellMapManager/Misc/AppVersion.cs | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/code/HellMapManager/Helpers/Mapper.cs b/code/HellMapManager/Helpers/Mapper.cs index fdd11a1..a6b1f80 100644 --- a/code/HellMapManager/Helpers/Mapper.cs +++ b/code/HellMapManager/Helpers/Mapper.cs @@ -230,6 +230,11 @@ public List Dilate(List src, int iterations) if (!Walked.ContainsKey(step.To)) { Walked[step.To] = step; + var sc = step.Exit as RoomConditionExit; + if (sc != null) + { + Shortcuts.Remove(sc); + } AddRoomWalkingSteps(step, pending, step.To, step.TotalCost); } } @@ -286,7 +291,6 @@ public QueryResult QueryPathAll(string start, List target) //用于在有某些限制条件的情况下,是指最新的上下文,然后尽可能多的遍历原路径中的房间 public QueryResult QueryPathOrdered(string start, List target) { - InitShortcuts(); target.RemoveAll(x => x == ""); if (target.Count == 0 || start == "") { @@ -331,7 +335,7 @@ private List GetRoomExitsWithoutShortcuts(Room room) } //验证并转换路径 //如果路径无效,返回空 - public WalkingStep? ValidateToWalkingStep(WalkingStep? prev, string from, Exit exit, int TotalCost) + private WalkingStep? ValidateToWalkingStep(WalkingStep? prev, string from, Exit exit, int TotalCost) { if (exit.To == "" || exit.To == from) { @@ -351,7 +355,7 @@ private List GetRoomExitsWithoutShortcuts(Room room) //转换 return WalkingStep.FromExit(prev, from, exit, cost, TotalCost); } - public WalkingStep? ValidateShortcutToWalkingStep(WalkingStep? prev, string from, RoomConditionExit shortcut, int TotalCost) + private WalkingStep? ValidateShortcutToWalkingStep(WalkingStep? prev, string from, RoomConditionExit shortcut, int TotalCost) { if (shortcut.To == "" || shortcut.To == from) { diff --git a/code/HellMapManager/Misc/AppVersion.cs b/code/HellMapManager/Misc/AppVersion.cs index 00f0180..2c6ddd0 100644 --- a/code/HellMapManager/Misc/AppVersion.cs +++ b/code/HellMapManager/Misc/AppVersion.cs @@ -2,7 +2,7 @@ namespace HellMapManager.Misc; public class AppVersion(int major, int minor, int patch) { - public static AppVersion Current { get; } = new(0, 20260403, 0); + public static AppVersion Current { get; } = new(0, 20260420, 0); public int Major { get; } = major; public int Minor { get; } = minor; public int Patch { get; } = patch;