* Truncates the cargo in this list to the given amount. It leaves the * first cargo entities and removes max_move from the back of the list. * @param max_move Maximum amount of entities to be removed from the list. * @return Amount of entities actually moved. */
| 646 | * @return Amount of entities actually moved. |
| 647 | */ |
| 648 | uint VehicleCargoList::Truncate(uint max_move) |
| 649 | { |
| 650 | max_move = std::min(this->count, max_move); |
| 651 | this->PopCargo(CargoRemoval<VehicleCargoList>(this, max_move)); |
| 652 | return max_move; |
| 653 | } |
| 654 | |
| 655 | /** |
| 656 | * Routes packets with station "avoid" as next hop to a different place. |
no test coverage detected