From 722a0835e822cfea8fb9fd7dbe1e4b8c23d43cd5 Mon Sep 17 00:00:00 2001 From: Myk Taylor Date: Sun, 12 Nov 2023 01:38:15 -0800 Subject: [PATCH] fix structure path to work details --- changelog.txt | 1 + emigration.lua | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/changelog.txt b/changelog.txt index 6b64a26fc9..623aa150f0 100644 --- a/changelog.txt +++ b/changelog.txt @@ -37,6 +37,7 @@ Template for new versions: ## Fixes - `gui/unit-syndromes`: show the syndrome names properly in the UI +- `emigration`: fix clearing of work details assigned to units that leave the fort ## Misc Improvements - `warn-stranded`: don't warn for units that are temporarily on unwalkable tiles (e.g. as they pass under a waterfall) diff --git a/emigration.lua b/emigration.lua index 742e1a147e..22dc4cee39 100644 --- a/emigration.lua +++ b/emigration.lua @@ -75,7 +75,7 @@ function desert(u,method,civ) end -- disassociate from work details - for _, detail in ipairs(df.global.plotinfo.hauling.work_details) do + for _, detail in ipairs(df.global.plotinfo.labor_info.work_details) do for k, v in ipairs(detail.assigned_units) do if v == u.id then detail.assigned_units:erase(k)