Skip to content

Commit f239c68

Browse files
authored
Apply suggestions from code review
1 parent 7a29c59 commit f239c68

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

changelog.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ Template for new versions:
5757
- `position`: option to copy keyboard cursor position to the clipboard
5858
- `assign-minecarts`: reassign vehicles to routes where the vehicle has been destroyed (or has otherwise gone missing)
5959
- `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
60-
- `idle-crafting`: make choice of crafting job dependent on resources in linked stockpiles.
6160
- `exterminate`: show descriptive names for the listed races in addition to their IDs
6261

6362
## Documentation

docs/idle-crafting.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ this way.
4646

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

5252
For workshops without input stockpile links, bone carving and stonecrafting are

idle-crafting.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ local function for_inputs(workshop, action)
1515
else
1616
for _, stockpile in ipairs(workshop.profile.links.take_from_pile) do
1717
for _, item in ipairs(dfhack.buildings.getStockpileContents(stockpile)) do
18-
if(item:isAssignedToThisStockpile(stockpile.id)) then
18+
if item:isAssignedToThisStockpile(stockpile.id) then
1919
for _, contained_item in ipairs(dfhack.items.getContainedItems(item)) do
2020
action(contained_item)
2121
end
@@ -25,7 +25,7 @@ local function for_inputs(workshop, action)
2525
end
2626
end
2727
for _, contained_item in ipairs(workshop.contained_items) do
28-
if contained_item.use_mode == 0 then
28+
if contained_item.use_mode == df.building_item_role_type.TEMP then
2929
action(contained_item.item)
3030
end
3131
end

0 commit comments

Comments
 (0)