| 221 | // |
| 222 | |
| 223 | static bool is_accessible_item(df::item *item, const vector<df::unit *> &citizens) { |
| 224 | const df::coord pos = Items::getPosition(item); |
| 225 | for (auto &unit : citizens) { |
| 226 | if (Maps::canWalkBetween(Units::getPosition(unit), pos)) |
| 227 | return true; |
| 228 | } |
| 229 | return false; |
| 230 | } |
| 231 | |
| 232 | // at least one member of the fort can reach a position adjacent to the given pos |
| 233 | static bool is_accessible_tree(const df::coord &pos, const vector<df::unit *> &citizens) { |