OpenTTD

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- Data Structures
- Class Hierarchy
- Data Fields

Public Types | Public Member Functions | Data Fields
GRFTempEngineData Struct Reference

Temporary engine data used when loading only. More...

## Public Types
enum | Refittability { UNSET = 0, EMPTY, NONEMPTY }
| Summary state of refittability properties. More...

## Public Member Functions
void | UpdateRefittability (bool non_empty)
| Update the summary refittability on setting a refittability property.

## Data Fields
uint16 | cargo_allowed
uint16 | cargo_disallowed
RailTypeLabel | railtypelabel
const GRFFile * | defaultcargo_grf
| GRF defining the cargo translation table to use if the default cargo is the 'first refittable'.
Refittability | refittability
| Did the newgrf set any refittability property? If not, default refittability will be applied.
bool | prop27_set
| Did the NewGRF set property 27 (misc flags)?
uint8 | rv_max_speed
| Temporary storage of RV prop 15, maximum speed in mph/0.8.
uint32 | ctt_include_mask
| Cargo types always included in the refit mask.
uint32 | ctt_exclude_mask
| Cargo types always excluded from the refit mask.

## Detailed Description

Temporary engine data used when loading only.

Definition at line 300 of file newgrf.cpp.

## Member Enumeration Documentation

enum GRFTempEngineData::Refittability

Summary state of refittability properties.

Enumerator:

  UNSET | No properties assigned. Default refit masks shall be activated.
  EMPTY | GRF defined vehicle as not-refittable. The vehicle shall only carry the default cargo.
  NONEMPTY | GRF defined the vehicle as refittable. If the refitmask is empty after translation (cargotypes not available), disable the vehicle.

Definition at line 302 of file newgrf.cpp.

## Member Function Documentation

void GRFTempEngineData::UpdateRefittability | ( | bool | non_empty | ) |
| inline

Update the summary refittability on setting a refittability property.

Parameters

  non_empty | true if the GRF sets the vehicle to be refittable.

Definition at line 322 of file newgrf.cpp.

References EMPTY, NONEMPTY, refittability, and UNSET.

Referenced by AircraftVehicleChangeInfo(), RailVehicleChangeInfo(), RoadVehicleChangeInfo(), and ShipVehicleChangeInfo().

The documentation for this struct was generated from the following file:

- src/newgrf.cpp