Dwarf Fortress Bug Tracker - Dwarf Fortress
View Issue Details
0008272Dwarf FortressDwarf Mode -- Jobs, Generalpublic2014-09-11 10:112014-09-11 12:35
Quietust 
Toady One 
normalminoralways
resolvedfixed 
0.40.12 
0.40.13 
0008272: Butchering "nearby" check ignores Z-level
In order to perform the "Butcher an Animal" job, there must be a "butcherable unrotten nearby item", and "nearby" is defined as "on a stockpile or within 20 tiles of the workshop".

However, the distance check ignores the Z-level - it checks if the item's X and Y coordinates are within 20 tiles of the workshop edges (building.x_min - item.x < 20, item.x - building.x_max < 20, building.y_min - item.y < 20, and item.y - buildin.y_max < 20), but it does not check the Z coordinate at all.
Kill a butcherable animal on the surface, then build a butcher's workshop deep underground beneath it and more than 20 tiles to either side. Observe that the corpse gets selected for butchering once the workshop is moved close enough laterally, but it doesn't care if the workshop is 100 Z-level beneath it.
This dates back to the 2D versions of Dwarf Fortress, where it didn't have any noticeable effect; when Z-levels got added, the "nearby" job item flag check never got updated accordingly.
No tags attached.
Issue History
2014-09-11 10:11QuietustNew Issue
2014-09-11 11:28FootkerchiefAssigned To => Footkerchief
2014-09-11 11:28FootkerchiefStatusnew => confirmed
2014-09-11 12:35Toady OneStatusconfirmed => resolved
2014-09-11 12:35Toady OneFixed in Version => Next Version
2014-09-11 12:35Toady OneResolutionopen => fixed
2014-09-11 12:35Toady OneAssigned ToFootkerchief => Toady One

There are no notes attached to this issue.