Action for finalizing a refit. More...
Public Member Functions | |
| FinalizeRefitAction (CargoArray &consist_capleft, Station *st, StationIDStack &next_station) | |
| Create a finalizing action. | |
| bool | operator() (Vehicle *v) |
| Reserve cargo from the station and update the remaining consist capacities with the vehicle's remaining free capacity. | |
Data Fields | |
| CargoArray & | consist_capleft |
| Capacities left in the consist. | |
| Station * | st |
| Station to reserve cargo from. | |
| StationIDStack & | next_station |
| Next hops to reserve cargo for. | |
Action for finalizing a refit.
Definition at line 1441 of file economy.cpp.
| FinalizeRefitAction::FinalizeRefitAction | ( | CargoArray & | consist_capleft, | |
| Station * | st, | |||
| StationIDStack & | next_station | |||
| ) | [inline] |
Create a finalizing action.
| consist_capleft | Capacities left in the consist. | |
| st | Station to reserve cargo from. | |
| next_station | Next hops to reserve cargo for. |
Definition at line 1453 of file economy.cpp.
| bool FinalizeRefitAction::operator() | ( | Vehicle * | v | ) | [inline] |
Reserve cargo from the station and update the remaining consist capacities with the vehicle's remaining free capacity.
| v | Vehicle to be finalized. |
Definition at line 1462 of file economy.cpp.
References Vehicle::cargo, GoodsEntry::cargo, Vehicle::cargo_cap, Vehicle::cargo_type, consist_capleft, Station::goods, next_station, VehicleCargoList::RemainingCount(), StationCargoList::Reserve(), st, and BaseStation::xy.
1.7.1