Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optionally accept precise OMT coordinates in debug "Teleport - to specific overmap" function #79343

Merged
merged 6 commits into from
Jan 30, 2025

Conversation

Stu33
Copy link
Contributor

@Stu33 Stu33 commented Jan 25, 2025

Summary

Interface "Optionally allows a specific overmap tile to be specified for the debug 'Teleport - to specific overmap' function."

Purpose of change

It is sometimes useful to teleport to a specific overmap tile, either when testing or when cheating/working around an issue. The existing 'teleport to specific overmap' option in the debug menu takes single integer x and y coordinates separated by a comma specifying a whole overmap (128x128 block of OMTs). Extending this syntax so that the existing overmap teleport works in the same way as before but more precise OMT coordinates can be used if desired makes it more useful.

Describe the solution

Extend parsing to understand the OMT coordinate system used in the overmap display - an integer overmap coordinate followed by a single quote/apostrophe and then an integer OMT offset within the overmap for each of x and y. If no OMT offset is given then a value of 0 is used, giving the same behaviour as existed previously. So you can now choose to teleport to 1'123,0'42 instead of just 1,0.

Describe alternatives you've considered

Not doing this. You can still reasonably quickly teleport to a specific OMT by teleporting to the origin of an overmap and then using the 'Teleport - Long Range' option to precisely select an OMT on the overmap view.

Testing

Used the feature to teleport around the map. Also checked that just specifying overmap coordinates as integers and that using optional integer z-coordinates continues to work as before.

Additional context

…te pairs rather than single integer coordinates.
@github-actions github-actions bot added [C++] Changes (can be) made in C++. Previously named `Code` Info / User Interface Game - player communication, menus, etc. new contributor BasicBuildPassed This PR builds correctly, label assigned by github actions labels Jan 25, 2025
src/debug_menu.cpp Outdated Show resolved Hide resolved
@github-actions github-actions bot added astyled astyled PR, label is assigned by github actions json-styled JSON lint passed, label assigned by github actions labels Jan 29, 2025
@GuardianDll
Copy link
Member

Can you resolve clang tidy errors?

@github-actions github-actions bot removed the astyled astyled PR, label is assigned by github actions label Jan 29, 2025
Stu33 and others added 2 commits January 29, 2025 15:50
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@github-actions github-actions bot added the astyled astyled PR, label is assigned by github actions label Jan 29, 2025
@GuardianDll GuardianDll merged commit 8762277 into CleverRaven:master Jan 30, 2025
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions [C++] Changes (can be) made in C++. Previously named `Code` Info / User Interface Game - player communication, menus, etc. json-styled JSON lint passed, label assigned by github actions new contributor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants