OpenTTD Source: StationSpec Struct Reference

OpenTTD Source 14.0-RC3

Data Fields
StationSpec Struct Reference

Station specification. More...

`#include <newgrf_station.h>`

## Data Fields
GRFFilePropsBase< NUM_CARGO+3 > | grf_prop
| Properties related the the grf file. More...
StationClassID | cls_id
| The class to which this spec belongs.
StringID | name
| Name of this station.
byte | disallowed_platforms
| Bitmask of number of platforms available for the station. More...
byte | disallowed_lengths
| Bitmask of platform lengths available for the station. More...
std::vector< NewGRFSpriteLayout > | renderdata
| Number of tile layouts. More...
uint16_t | cargo_threshold
| Cargo threshold for choosing between little and lots of cargo. More...
CargoTypes | cargo_triggers
| Bitmask of cargo types which cause trigger re-randomizing.
byte | callback_mask
| Bitmask of station callbacks that have to be called.
byte | flags
| Bitmask of flags, bit 0: use different sprite set; bit 1: divide cargo about by station size.
byte | pylons
| Bitmask of base tiles (0 - 7) which should contain elrail pylons.
byte | wires
| Bitmask of base tiles (0 - 7) which should contain elrail wires.
byte | blocked
| Bitmask of base tiles (0 - 7) which are blocked to trains.
AnimationInfo | animation
std::vector< std::vector< std::vector< byte > > > | layouts
| Custom platform layouts. More...

## Detailed Description

Station specification.

Definition at line 112 of file newgrf_station.h.

## Field Documentation

## ◆ cargo_threshold

uint16_t StationSpec::cargo_threshold

Cargo threshold for choosing between little and lots of cargo.

Note
  little/lots are equivalent to the moving/loading states for vehicles

Definition at line 153 of file newgrf_station.h.

## ◆ disallowed_lengths

byte StationSpec::disallowed_lengths

Bitmask of platform lengths available for the station.

0..6 correspond to 1..7, while bit 7 corresponds to >7 tiles long.

Definition at line 137 of file newgrf_station.h.

Referenced by BuildRailStationWindow::CheckSelectedSize().

## ◆ disallowed_platforms

byte StationSpec::disallowed_platforms

Bitmask of number of platforms available for the station.

0..6 correspond to 1..7, while bit 7 corresponds to >7 platforms.

Definition at line 132 of file newgrf_station.h.

Referenced by BuildRailStationWindow::CheckSelectedSize().

## ◆ grf_prop

GRFFilePropsBase<NUM_CARGO + 3> StationSpec::grf_prop

Properties related the the grf file.

NUM_CARGO real cargo plus three pseudo cargo sprite groups. Used for obtaining the sprite offset of custom sprites, and for evaluating callbacks.

Definition at line 124 of file newgrf_station.h.

Referenced by AllocateSpecToStation(), StationResolverObject::GetDebugID(), MoveWaypointsToBaseStations(), and StationResolverObject::StationResolverObject().

## ◆ layouts

std::vector<std::vector<std::vector<byte> > > StationSpec::layouts

Custom platform layouts.

This is a 2D array containing an array of tiles. 1st layer is platform lengths. 2nd layer is tracks (width). These can be sparsely populated, and the upper limit is not defined but limited to 255.

Definition at line 175 of file newgrf_station.h.

Referenced by GetStationLayout().

## ◆ renderdata

std::vector<NewGRFSpriteLayout> StationSpec::renderdata

Number of tile layouts.

A minimum of 8 is required is required for stations. 0-1 = plain platform 2-3 = platform with building 4-5 = platform with roof, left side 6-7 = platform with roof, right side Array of tile layouts.

Definition at line 147 of file newgrf_station.h.

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

- src/newgrf_station.h