Disintegrates the unit and removes it from the map. If the unit is a factory or a rocket, also disintegrates any units garrisoned inside it. NoSuchUnit - the unit does not exist (inside the vision range). TeamNotAllowed - the unit is not on the current player's team.
(&mut self, id: UnitID)
| 965 | /// * NoSuchUnit - the unit does not exist (inside the vision range). |
| 966 | /// * TeamNotAllowed - the unit is not on the current player's team. |
| 967 | pub fn disintegrate_unit(&mut self, id: UnitID) -> Result<(), GameError> { |
| 968 | self.my_unit(id)?; |
| 969 | self.destroy_unit(id); |
| 970 | Ok(()) |
| 971 | } |
| 972 | |
| 973 | // ************************************************************************ |
| 974 | // ************************* LOCATION METHODS ***************************** |
no test coverage detected