Skip to content

Commit 6cf7d0a

Browse files
authored
Merge pull request #1439 from myk002/myk_5111
use new assigned_unit API for 51.11
2 parents 3220332 + aade3cf commit 6cf7d0a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fix/ownership.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ local zone_vecs = {
3333
local function relink_zones()
3434
for _,zones in ipairs(zone_vecs) do
3535
for _,zone in ipairs(zones) do
36-
local unit = zone.assigned_unit
36+
local unit = dfhack.buildings.getOwner(zone)
3737
if not unit then goto continue end
3838
if not utils.linear_index(unit.owned_buildings, zone.id, 'id') then
3939
print(('fix/ownership: Restoring %s ownership link for %s'):format(

0 commit comments

Comments
 (0)