Skip to content

Conversation

@chdoc
Copy link
Member

@chdoc chdoc commented Sep 11, 2024

No description provided.

@chdoc chdoc changed the title idle-crafting: make choice of crafting job dependent on inked stockpiles. idle-crafting: make choice of crafting job dependent on linked stockpiles. Sep 11, 2024
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.

nice work!

local function for_inputs(workshop, action)
if #workshop.profile.links.take_from_pile == 0 then
dfhack.error('workshop has no links')
else
Copy link
Member

Choose a reason for hiding this comment

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

you can turn the else into an end and save some indentation in the rest of the function. dfhack.error throws and does not allow the function to continue.

@myk002 myk002 merged commit e8fd606 into DFHack:master Sep 15, 2024
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