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

Add a display for melt remainders #1326

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gamma-delta
Copy link

Hello, I wrote this script that adds an overlay for how much metal a smelter has from "Melt an Item" jobs.

If there's 0 or 1 melt remainder types, it'll say what it is and how much; otherwise it will tell you the number of metals inside. You can click for a full view of all the metals and their remainders.

This is my first foray into DFHack-ing, so please give me feedback! (Especially, I can't figure out how to use the actual material name, so I'm just using its internal raws name. Also, I bet it doesn't handle divine metals properly, but I only have a few divine metal items in my fort and I'm using them to keep my monarch happy, so I can't test it 😅 )

@gamma-delta
Copy link
Author

pre-commit.ci autofix

@gamma-delta gamma-delta force-pushed the new-scripts/gui-melt-remainder branch from e6a6e86 to a3cb1dc Compare October 8, 2024 18:11

ENABLED = ENABLED or false

local function i_hate_lua(tbl)
Copy link
Member

Choose a reason for hiding this comment

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

This isn't really an appropriate place to express your opinions on the scripting language DFHack uses.

local rems = get_melt_remainders(workshop)
if not rems then return end

printall(rems)
Copy link
Member

Choose a reason for hiding this comment

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

Leftover debug statement?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants