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 authored Aug 15, 2024
1 parent e3e5438 commit 16621bf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion docs/idle-crafting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ Usage
to ``500,1000,10000``.

``disable idle-crafting``
Disallow idle crafting at all workshops and disable the tool.
Disallow idle crafting at all workshops. You can re-enable idle crafting
at individual Craftsdwarf's workshops.

Examples
--------
Expand Down
4 changes: 2 additions & 2 deletions idle-crafting.lua
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ end
---@return df.building_workshopst|nil
local function locateWorkshop(id)
local workshop = df.building.find(id)
if df.building_workshopst:is_instance(workshop) and workshop.type == 3 then
if df.building_workshopst:is_instance(workshop) and workshop.type == df.workshop_type.Craftsdwarfs then
return workshop
else
return nil
Expand Down Expand Up @@ -355,7 +355,7 @@ end

IdleCraftingOverlay = defclass(IdleCraftingOverlay, overlay.OverlayWidget)
IdleCraftingOverlay.ATTRS {
desc = 'Adds a UI to the Workers tab too enable idle crafting.',
desc = 'Adds a toggle for recreational crafting to Craftdwarf's workshops.',
default_pos = { x = -42, y = 41 },
default_enabled = true,
viewscreens = {
Expand Down

0 comments on commit 16621bf

Please sign in to comment.