OpenTTD Source 20250312-master-gcdcc6b491d
|
Refit preparation action. More...
Public Member Functions | |
PrepareRefitAction (CargoArray &consist_capleft, CargoTypes &refit_mask) | |
Create a refit preparation action. | |
bool | operator() (const Vehicle *v) |
Prepares for refitting of a vehicle, subtracting its free capacity from consist_capleft and adding the cargoes it can refit to to the refit mask. | |
Data Fields | |
CargoArray & | consist_capleft |
Capacities left in the consist. | |
CargoTypes & | refit_mask |
Bitmask of possible refit cargoes. | |
Refit preparation action.
Definition at line 1383 of file economy.cpp.
|
inline |
Create a refit preparation action.
consist_capleft | Capacities left in consist, to be updated here. |
refit_mask | Refit mask to be constructed from refit information of vehicles. |
Definition at line 1393 of file economy.cpp.
|
inline |
Prepares for refitting of a vehicle, subtracting its free capacity from consist_capleft and adding the cargoes it can refit to to the refit mask.
v | The vehicle to be refitted. |
Definition at line 1402 of file economy.cpp.
References Vehicle::cargo, Vehicle::cargo_cap, Vehicle::cargo_type, Vehicle::engine_type, and VehicleCargoList::ReservedCount().
CargoArray& PrepareRefitAction::consist_capleft |
Capacities left in the consist.
Definition at line 1385 of file economy.cpp.
CargoTypes& PrepareRefitAction::refit_mask |
Bitmask of possible refit cargoes.
Definition at line 1386 of file economy.cpp.