check if contained in item (e.g. animals in cages)
| 613 | |
| 614 | // check if contained in item (e.g. animals in cages) |
| 615 | static bool isContainedInItem(df::unit *unit) { |
| 616 | for (auto gref : unit->general_refs) { |
| 617 | if (gref->getType() == df::general_ref_type::CONTAINED_IN_ITEM) { |
| 618 | return true; |
| 619 | } |
| 620 | } |
| 621 | return false; |
| 622 | } |
| 623 | |
| 624 | // found a unit with weird position values on one of my maps (negative and in the thousands) |
| 625 | // it didn't appear in the animal stocks screen, but looked completely fine otherwise (alive, tame, own, etc) |
no test coverage detected