Remove the legacy town_npc_nav tracker system which was superseded by
the unified tracker. The old tracker was still firing on PgUp/PgDown
due to hardcoded fallback logic in PressKey().
Changes:
- Remove PgUp/PgDown fallbacks in PressKey() (keep store/chat handling)
- Remove 5 keymapper registrations (ListTownNpcs, PreviousTownNpc,
NextTownNpc, SpeakSelectedTownNpc, GoToSelectedTownNpc)
- Remove UpdateAutoWalkTownNpc() and ResetAutoWalkTownNpc() calls
- Remove migration code references in options.cpp
- Delete town_npc_nav.cpp and town_npc_nav.hpp
- Update CMakeLists.txt
Town NPC tracking is now handled by the unified tracker's NPCs category.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace 7 individual navigation/tracker key registrations with 3 unified
tracker keys: PageUp (previous), PageDown (next), Home (navigate/walk).
Unbind legacy town NPC nav keys (now superseded by tracker Npcs category).
Update health key description to mention Shift+mana.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Fix copy-paste comment errors in SpellBookKeyPressed() that referred to
"inventory" instead of "spellbook", and QuestLogKeyPressed() that said
"character quest log" instead of "quest log". Correct a misleading
FindPath comment in town NPC auto-walk, and update a stale SourceX path
reference in diablo.cpp.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove ~4,042 lines of extracted function bodies and forward
declarations from diablo.cpp. Add includes for the 6 new module
headers. Update CancelAutoWalkInternal() to delegate to
ResetAutoWalkTracker() and ResetAutoWalkTownNpc().
Remove unused includes from diablo.cpp that were only needed by the
extracted code (<queue>, format_int.hpp, tile_properties.hpp).
Add the 6 new .cpp files to Source/CMakeLists.txt so they are
compiled into libdevilutionx.
Also includes post-review cleanups:
- Remove unused automap.h include from accessibility_keys.cpp
- Remove unused walk_path_speech.hpp include from diablo.cpp
- Replace .size() == 0 with .empty() in accessibility_keys.cpp
- Simplify CanAutomapBeToggledOff to direct return expression
- Remove unreachable dead code and dead FindPreferredExitTriggerIndex
function from navigation_speech.cpp
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Use object->position instead of the archway tile position when reporting
door locations in FindFirstClosedDoorOnWalkPath and
FindFirstTrackerPathBlock. Archway tiles (negative dObject refs) resolve
to the parent door object, but the returned position was the archway
tile rather than the door itself, causing the player to stop one tile
short.
Also: move DOOR_CLOSED/DOOR_OPEN/DOOR_BLOCKED enum from objects.cpp to
objects.h so diablo.cpp can use the canonical constants directly instead
of maintaining duplicate constexpr values. Add static_assert for
MAXOBJECTS fitting in int8_t, defensive assertions in AddDoor(), and
clarify comments around door state checks.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
CancelAutoWalk() now sends a walk-to-current-position command to
immediately clear the walk path buffer, instead of only preventing new
segments. Move the M key cancellation check above the CanPlayerTakeAction
guard so it works mid-walk. Add CancelAutoWalk() calls to secondary
action (D), spell action (W), and arrow-key walk so all player inputs
properly cancel an in-progress auto-walk.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix OBJ_SIGNCHEST validation mismatch (Chests case now uses
ValidateAutoWalkObjectTarget matching IsTrackedChestObject)
- Add spoken feedback for all silent early returns (bounds checks,
MyPlayer nullptr)
- M key now toggles: press again to cancel in-progress auto-walk
- A/Shift+A cancels auto-walk silently before attacking
- Auto-walk cancels when in-game menu opens
- Extract IsTrackedMonster() predicate (replaces 3 inline checks)
- Remove default: from Monsters switch cases to enable -Wswitch
exhaustiveness checking
- Add defensive re-validation in ResolveObjectTrackerTarget
- Add documentation comments
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Allow the player to automatically walk toward the currently selected
tracker target by pressing M. Supports all tracker categories: items,
chests, doors, shrines, objects, breakables, and monsters. The walk
stops when the target is within interaction range or becomes invalid.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
These files had mixed CRLF/LF line endings. Normalize to CRLF to
match the .editorconfig convention for C++ source files.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Mute proximity sound cues while inventory is open
- Speak current dungeon+floor on entry and via L
- Warn when equipped items are near breaking
- Announce boss HP every 10% drop
- Move Chat Log off L and migrate old bindings
Adds new tracker categories (T) for doors, shrines, interactable objects, and breakables, and updates N/Shift+N to navigate/cycle within these categories.
Object tracking uses the dungeon object grid (dObject) for reliable discovery, and Polish translations were updated.
Tracker (N / Shift+N) now looks for items and monsters using the dungeon lookup grids (dItem/dMonster) instead of only the ActiveItems/ActiveMonsters lists. This prevents cases where proximity audio indicates nearby targets but tracker reports none.
Shift+E now points to the nearest quest set-level entrance on the current level (Poisoned Water, Skeleton King, Chamber of Bone, Lazarus), which is not represented by normal triggers.
Also updates keymapper description and Polish translations.