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

Position.lua: site/adv world coords #1292

Merged
merged 5 commits into from
Sep 6, 2024
Merged

Conversation

Bumber64
Copy link
Contributor

@Bumber64 Bumber64 commented Sep 4, 2024

Print current site world coords, or adventurer (if applicable). Also swapped out uses of math.floor for //. Decreased padding zeros for current year from 5 to 3 digits (which is still sufficient to distinguish it from a month or day).

Script is now tagged adventure. It needs testing by someone on the adventurer beta. (Needs to be run inside site, outside site, travel mode, and dead.)

Moved some changelog entries in the template section to the proper spot (if nobody fixes that before this PR merges).

docs/position.rst Outdated Show resolved Hide resolved
position.lua Outdated
--TODO: print(' The fortress is at '..x, y..' on the world map ('..worldsize..' square)')
print(' The window is '..df.global.gps.dimx..' tiles wide and '..df.global.gps.dimy..' tiles high.')

if df.global.gps.mouse_x < 0 then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we print out mouse cursor location, we should probably also print out the map coordinates of where the mouse is (dfhack.gui.getMousePos())

Copy link
Contributor Author

@Bumber64 Bumber64 Sep 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ended up putting this on a separate line. Let me know if it looks okay. It says "The mouse is" twice in a row, but that looks better than doing a comma+indent, IMO.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could also add an option to copy mouse tile position to clipboard. However there's limited feedback of where the mouse cursor is on the grid, and it would be difficult to use with the full launcher (which blocks most of the screen).

position.lua Outdated Show resolved Hide resolved
position.lua Outdated Show resolved Hide resolved
* Update position.lua
* Update position.rst
* Update changelog.txt
@myk002 myk002 merged commit f99a7fd into DFHack:master Sep 6, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants