Skip to content

questport, reveal-adv-map: fix for current viewscreen_adventure_logst - #1621

Open
Alistair-Afton wants to merge 1 commit into
DFHack:masterfrom
Alistair-Afton:fix-questport-5894
Open

Alistair-Afton wants to merge 1 commit into
DFHack:masterfrom
Alistair-Afton:fix-questport-5894

Conversation

@Alistair-Afton

Copy link
Copy Markdown

Summary

  • questport: read the quest log cursor and player position from map_display (cursor, cur_loc) instead of the removed top-level fields, which crashed the script
  • questport: use A_MOVE_S to trigger the initial travel move (CURSOR_* keys do nothing in travel mode now)
  • questport: fix not travel_not_moved on a numeric flag, which was always false in Lua and made the relocate-existing-army branch dead code; also guards a missing army and errors out on zoomed map views where the cursor is not in region coordinates
  • reveal-adv-map: update the live quest log map bounds via map_display.min/max/cur_loc/cursor

Fixes DFHack/dfhack#5894

Testing

  • In adventure mode (DF 0.53.16), selected a site in the quest log and ran questport: entered fast travel with travel_origin at the target and the player army spawned at the destination
  • While already fast traveling, ran questport again: the player army was relocated to the new target region
  • Verified the "already at target" and zoomed-map error paths
  • reveal-adv-map and reveal-adv-map --hide correctly expand/clamp the live map bounds while the quest log is open

The quest log's cursor, player position, and map bounds moved into the
map_display compound, so both scripts crashed reading the removed
top-level fields. Also fixes two latent porting bugs in questport:
travel-mode movement needs A_MOVE_* keys rather than CURSOR_*, and
`not travel_not_moved` on a numeric flag is always false in Lua, which
left the relocate-existing-army branch unreachable.

Fixes DFHack/dfhack#5894
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Questport command doesn't work

1 participant