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
Port locate-ore for DFHack/dfhack#2081 #489
Conversation
205e9ac
to
7bf9f1a
Compare
locate-ore.lua
Outdated
local function centerViewOnPos(pos) | ||
-- TODO: How the heck do I do this? | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the only thing holding me up from completing this script. I can't quite figure out how to do this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think what you're looking for is dfhack.gui.pauseRecenter(pos, false)
See https://docs.dfhack.org/en/stable/docs/dev/Lua%20API.html#fortress-mode
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is indeed, that works perfectly
7bf9f1a
to
710f42f
Compare
I have opened this PR up for review. As an aside what is this pre-commit thing actually failing on? Does it not want a new line at the end of the file is that it? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks great!
Co-authored-by: Myk <myk.taylor@gmail.com>
pre-commit.ci autofix |
for more information, see https://pre-commit.ci
it enforces exactly one newline at the end of the file. it looks like you had a blank line, and then an additional terminating newline. |
I'm submitting this draft just to claim the script for porting. I will finish this after work tomorrow.