* Shifts cargo between two vehicles. * @param dest Other vehicle's cargo list. * @param max_move Maximum amount of cargo to be moved. * @return Amount of cargo actually moved. */
| 607 | * @return Amount of cargo actually moved. |
| 608 | */ |
| 609 | uint VehicleCargoList::Shift(uint max_move, VehicleCargoList *dest) |
| 610 | { |
| 611 | max_move = std::min(this->count, max_move); |
| 612 | this->PopCargo(CargoShift(this, dest, max_move)); |
| 613 | return max_move; |
| 614 | } |
| 615 | |
| 616 | /** |
| 617 | * Unloads cargo at the given station. Deliver or transfer, depending on the |
no test coverage detected