Skip to content

Commit

Permalink
use new work details flags field name
Browse files Browse the repository at this point in the history
  • Loading branch information
myk002 committed Jun 7, 2024
1 parent d1ac718 commit 8aaed4d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion autofish.lua
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function toggle_fishing_labour(state)
local work_details = df.global.plotinfo.labor_info.work_details
for _,v in pairs(work_details) do
if v.allowed_labors.FISH then
v.work_detail_flags.mode = state and
v.flags.mode = state and
df.work_detail_mode.OnlySelectedDoesThis or df.work_detail_mode.NobodyDoesThis

-- since the work details are not actually applied unless a button
Expand Down
4 changes: 2 additions & 2 deletions gui/settings-manager.lua
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ local function save_work_details()
local detail = {
name=wd.name,
icon=wd.icon,
work_detail_flags=clone_wd_flags(wd.work_detail_flags),
flags=clone_wd_flags(wd.flags),
allowed_labors=utils.clone(wd.allowed_labors),
}
details[idx+1] = detail
Expand All @@ -455,7 +455,7 @@ local function load_work_details()
new=df.work_detail,
name=wd.name,
icon=wd.icon,
work_detail_flags=wd.work_detail_flags,
flags=wd.flags or wd.work_detail_flags, -- compat for old name
}
li.work_details[idx-1] = detail
local al = li.work_details[idx-1].allowed_labors
Expand Down

0 comments on commit 8aaed4d

Please sign in to comment.