Skip to content

Commit c156965

Browse files
authored
Merge pull request DFHack#5578 from SilasD/zone-trader-critters
Prevent assignment of trader-owned small pets (items, not units) to pits, ponds, and cages.
2 parents 5d5288a + 2ef698c commit c156965

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

docs/changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ Template for new versions:
5656
## New Features
5757

5858
## Fixes
59+
- small animals owned by traders can no longer be assigned to pits, ponds, and cages.
5960

6061
## Misc Improvements
6162

plugins/lua/zone.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,9 @@ local function is_assignable_unit(unit)
602602
end
603603

604604
local function is_assignable_item(item)
605-
-- all vermin/small pets are assignable
605+
-- small pets owned by traders are not assignable
606+
if item.flags.trader then return false end
607+
-- other vermin/small pets are assignable
606608
return true
607609
end
608610

0 commit comments

Comments
 (0)