questport, reveal-adv-map: fix for current viewscreen_adventure_logst - #1621
Open
Alistair-Afton wants to merge 1 commit into
Open
Alistair-Afton wants to merge 1 commit into
Alistair-Afton wants to merge 1 commit into
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
questport: read the quest log cursor and player position frommap_display(cursor,cur_loc) instead of the removed top-level fields, which crashed the scriptquestport: useA_MOVE_Sto trigger the initial travel move (CURSOR_*keys do nothing in travel mode now)questport: fixnot travel_not_movedon 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 coordinatesreveal-adv-map: update the live quest log map bounds viamap_display.min/max/cur_loc/cursorFixes DFHack/dfhack#5894
Testing
questport: entered fast travel withtravel_originat the target and the player army spawned at the destinationquestportagain: the player army was relocated to the new target regionreveal-adv-mapandreveal-adv-map --hidecorrectly expand/clamp the live map bounds while the quest log is open