|
OpenTTD Source 20251104-master-g3befbdd52f
|
Action for finalizing a refit. More...
Public Member Functions | |
| FinalizeRefitAction (CargoArray &consist_capleft, Station *st, std::span< const StationID > next_station, bool do_reserve) | |
| 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. | |
| std::span< const StationID > | next_station |
| Next hops to reserve cargo for. | |
| bool | do_reserve |
| If the vehicle should reserve. | |
Action for finalizing a refit.
Definition at line 1433 of file economy.cpp.
|
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. |
| do_reserve | If we should reserve cargo or just add up the capacities. |
Definition at line 1447 of file economy.cpp.
|
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 1456 of file economy.cpp.
References Vehicle::cargo, Vehicle::cargo_cap, Vehicle::cargo_type, Station::goods, and VehicleCargoList::RemainingCount().
| CargoArray& FinalizeRefitAction::consist_capleft |
Capacities left in the consist.
Definition at line 1435 of file economy.cpp.
| bool FinalizeRefitAction::do_reserve |
If the vehicle should reserve.
Definition at line 1438 of file economy.cpp.
| std::span<const StationID> FinalizeRefitAction::next_station |
Next hops to reserve cargo for.
Definition at line 1437 of file economy.cpp.
| Station* FinalizeRefitAction::st |
Station to reserve cargo from.
Definition at line 1436 of file economy.cpp.