| 105 | } |
| 106 | |
| 107 | void Burrows::setAssignedUnit(df::burrow *burrow, df::unit *unit, bool enable) |
| 108 | { |
| 109 | CHECK_NULL_POINTER(unit); |
| 110 | CHECK_NULL_POINTER(burrow); |
| 111 | |
| 112 | if (enable) { |
| 113 | if (burrow->flags.bits.suspended) |
| 114 | insert_into_vector(unit->inactive_burrows, burrow->id); |
| 115 | else |
| 116 | insert_into_vector(unit->burrows, burrow->id); |
| 117 | insert_into_vector(burrow->units, unit->id); |
| 118 | } else { |
| 119 | erase_from_vector(unit->burrows, burrow->id); |
| 120 | erase_from_vector(unit->inactive_burrows, burrow->id); |
| 121 | erase_from_vector(burrow->units, unit->id); |
| 122 | } |
| 123 | } |
| 124 | |
| 125 | void Burrows::listBlocks(std::vector<df::map_block*> *pvec, df::burrow *burrow) |
| 126 | { |
nothing calls this directly
no test coverage detected