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

global necronomicon functionality #1325

Merged
merged 6 commits into from
Nov 28, 2024

Conversation

c3r341
Copy link
Contributor

@c3r341 c3r341 commented Oct 8, 2024

edits to necronomicon.lua to add a worldwide search function

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.

could you add a line to https://github.com/DFHack/scripts/blob/master/changelog.txt#L42 under Misc Improvements for this change?

@@ -23,3 +23,7 @@ Options
``-s``, ``--include-slabs``
Also list slabs that contain the secrets of life and death. Note that
dwarves cannot read the secrets from a slab in fort mode.

``-w``, ``-world``
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
``-w``, ``-world``
``-w``, ``--world``

necronomicon.lua Outdated
print()
for _,rec in ipairs(df.global.world.artifacts.all) do
if df.item_slabst:is_instance(rec.item) and check_slab_secrets(rec.item) then
print(dfhack.TranslateName(rec.name))
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
print(dfhack.TranslateName(rec.name))
print(dfhack.df2console(dfhack.TranslateName(rec.name)))

@@ -79,20 +79,50 @@ function necronomicon(include_slabs)
end
end

function necronomicon_world(include_slabs)
Copy link
Member

@myk002 myk002 Nov 12, 2024

Choose a reason for hiding this comment

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

could you fix the indentation of this function? it should be four spaces per indent, no tabs. The pre-commit.ci autofix might be able to do it for you. (see https://results.pre-commit.ci/run/github/54066125/1728398159.cyDmLoGvQYO2Zc9I5N4ilg )

@myk002
Copy link
Member

myk002 commented Nov 28, 2024

pre-commit.ci autofix

@myk002 myk002 merged commit 00332f5 into DFHack:master Nov 28, 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