OpenTTD Source: SpriteGroupCargo Namespace Reference

OpenTTD Source 15.0-beta1

Variables
SpriteGroupCargo Namespace Reference

Sprite Group Cargo types. More...

## Variables
static constexpr CargoID | SG_DEFAULT = NUM_CARGO
| Default type used when no more-specific cargo matches.
static constexpr CargoID | SG_PURCHASE = NUM_CARGO + 1
| Used in purchase lists before an item exists.
static constexpr CargoID | SG_DEFAULT_NA = NUM_CARGO + 2
| Used only by stations and roads when no more-specific cargo matches.

## Detailed Description

Sprite Group Cargo types.

These special cargo types are used when resolving sprite groups when non-cargo-specific sprites or callbacks are needed, e.g. in purchase lists, or if no specific cargo type sprite group is supplied.

## Variable Documentation

## ◆ SG_DEFAULT

constexpr CargoID SpriteGroupCargo::SG_DEFAULT = NUM_CARGO
| staticconstexpr

Default type used when no more-specific cargo matches.

Definition at line 23 of file newgrf_cargo.h.

Referenced by StationResolverObject::ResolveReal(), StationResolverObject::StationResolverObject(), and VehicleResolverObject::VehicleResolverObject().

## ◆ SG_DEFAULT_NA

constexpr CargoID SpriteGroupCargo::SG_DEFAULT_NA = NUM_CARGO + 2
| staticconstexpr

Used only by stations and roads when no more-specific cargo matches.

Definition at line 25 of file newgrf_cargo.h.

Referenced by StationResolverObject::ResolveReal(), and StationResolverObject::StationResolverObject().

## ◆ SG_PURCHASE

constexpr CargoID SpriteGroupCargo::SG_PURCHASE = NUM_CARGO + 1
| staticconstexpr

Used in purchase lists before an item exists.

Definition at line 24 of file newgrf_cargo.h.

Referenced by StationResolverObject::ResolveReal(), StationResolverObject::StationResolverObject(), and VehicleResolverObject::VehicleResolverObject().