Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
myk002 committed Sep 15, 2024
1 parent 7a29c59 commit f239c68
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ Template for new versions:
- `position`: option to copy keyboard cursor position to the clipboard
- `assign-minecarts`: reassign vehicles to routes where the vehicle has been destroyed (or has otherwise gone missing)
- `fix/dry-buckets`: prompt DF to recheck requests for aid (e.g. "bring water" jobs) when a bucket is unclogged and becomes available for use
- `idle-crafting`: make choice of crafting job dependent on resources in linked stockpiles.
- `exterminate`: show descriptive names for the listed races in addition to their IDs

## Documentation
Expand Down
2 changes: 1 addition & 1 deletion docs/idle-crafting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ this way.

When a workshop is designated for idle crafting, this tool will create crafting
jobs and assign them to idle dwarves who have a need for crafting objects. This
script respects the setting for permitted general work orders from the "Workers"
script respects the setting for permitted general work order labors from the "Workers"
tab.

For workshops without input stockpile links, bone carving and stonecrafting are
Expand Down
4 changes: 2 additions & 2 deletions idle-crafting.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ local function for_inputs(workshop, action)
else
for _, stockpile in ipairs(workshop.profile.links.take_from_pile) do
for _, item in ipairs(dfhack.buildings.getStockpileContents(stockpile)) do
if(item:isAssignedToThisStockpile(stockpile.id)) then
if item:isAssignedToThisStockpile(stockpile.id) then
for _, contained_item in ipairs(dfhack.items.getContainedItems(item)) do
action(contained_item)
end
Expand All @@ -25,7 +25,7 @@ local function for_inputs(workshop, action)
end
end
for _, contained_item in ipairs(workshop.contained_items) do
if contained_item.use_mode == 0 then
if contained_item.use_mode == df.building_item_role_type.TEMP then
action(contained_item.item)
end
end
Expand Down

0 comments on commit f239c68

Please sign in to comment.