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

Port locate-ore for DFHack/dfhack#2081 #489

Merged
merged 3 commits into from Dec 20, 2022
Merged

Conversation

AridTag
Copy link
Contributor

@AridTag AridTag commented Dec 19, 2022

I'm submitting this draft just to claim the script for porting. I will finish this after work tomorrow.

locate-ore.lua Outdated
Comment on lines 69 to 71
local function centerViewOnPos(pos)
-- TODO: How the heck do I do this?
end
Copy link
Contributor Author

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.

Copy link
Member

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

Copy link
Contributor Author

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

@AridTag AridTag marked this pull request as ready for review December 20, 2022 04:54
@AridTag
Copy link
Contributor Author

AridTag commented Dec 20, 2022

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?

@AridTag AridTag changed the title WIP Port locate-ore for DFHack/dfhack#2081 Port locate-ore for DFHack/dfhack#2081 Dec 20, 2022
Copy link
Member

@myk002 myk002 left a comment

Choose a reason for hiding this comment

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

looks great!

locate-ore.lua Outdated Show resolved Hide resolved
locate-ore.lua Outdated Show resolved Hide resolved
Co-authored-by: Myk <myk.taylor@gmail.com>
@myk002
Copy link
Member

myk002 commented Dec 20, 2022

pre-commit.ci autofix

@myk002 myk002 merged commit e0a02c9 into DFHack:master Dec 20, 2022
@AridTag AridTag deleted the PortLocateOre branch December 20, 2022 13:44
@myk002
Copy link
Member

myk002 commented Dec 26, 2022

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?

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.

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
2 participants