* Returns reserved cargo to the station and removes it from the cache. * @param max_move Maximum amount of cargo to move. * @param dest Station the cargo is returned to. * @param next ID of the next station the cargo wants to go to. * @param current_tile Current tile the cargo handling is happening on. * @return Amount of cargo actually returned. */
| 594 | * @return Amount of cargo actually returned. |
| 595 | */ |
| 596 | uint VehicleCargoList::Return(uint max_move, StationCargoList *dest, StationID next, TileIndex current_tile) |
| 597 | { |
| 598 | max_move = std::min(this->action_counts[MTA_LOAD], max_move); |
| 599 | this->PopCargo(CargoReturn(this, dest, max_move, next, current_tile)); |
| 600 | return max_move; |
| 601 | } |
| 602 | |
| 603 | /** |
| 604 | * Shifts cargo between two vehicles. |
no test coverage detected