using System.Collections.Generic; using Cielonos.MainGame.Map; using UnityEngine; namespace Cielonos.MainGame { public partial class RunManager { /// /// 地图查询与揭示接口。 /// 这里是纯 RunState 查询/写入层,不触发 Zone 加载,也不切换 RunPhase。 /// public class RunMapQuerySubmodule : SubmoduleBase { public RunMapQuerySubmodule(RunManager owner) : base(owner) { } public bool CanSelectMapNodes => owner.currentRun != null && owner.phaseSm.IsPhaseAllowingNodeSelection() && !owner.HasPendingCombatRewards; public HashSet GetSelectablePositions() { if (!CanSelectMapNodes) { return new HashSet(); } return MapFogCalculator.ComputeSelectableSet(owner.currentRun); } public Dictionary GetAllNodeDisplayStates() { if (owner.currentRun == null) { return new Dictionary(); } return MapFogCalculator.Calculate(owner.currentRun); } public bool IsNodeExhausted(Vector2Int position) { return owner.currentRun != null && owner.currentRun.exhaustedNodes.Contains(position); } public void IncreaseScoutRange(int amount) { if (owner.currentRun == null) return; owner.currentRun.scoutRange += amount; Debug.Log($"[RunManager] 探测范围增加 {amount},当前:{owner.currentRun.scoutRange}"); } public void RevealNode(Vector2Int position) { if (owner.currentRun == null) return; owner.currentRun.permanentlyRevealedNodes.Add(position); Debug.Log($"[RunManager] 永久揭示节点 {position}"); } public void RevealNodeType(MapNodeType nodeType) { if (owner.currentRun == null) return; owner.currentRun.permanentlyRevealedTypes.Add(nodeType); Debug.Log($"[RunManager] 永久揭示所有 {nodeType} 类型节点"); } } } }