# StationSpec Struct Reference

## Data Fields
struct GRFFile * | grffile
| ID of GRF file station belongs to.
int | localidx
| Index within GRF file of station.
bool | allocated
| Flag whether this station has been added to a station class list.
StationClassID | sclass
| 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.
byte | disallowed_lengths
| Bitmask of platform lengths available for the station.
uint | tiles
| Number of tile layouts.
DrawTileSprites * | renderdata
| Array of tile layouts.
bool | copied_renderdata
uint16 | cargo_threshold
| Cargo threshold for choosing between little and lots of cargo.
uint32 | 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.
byte | lengths
byte * | platforms
StationLayout ** | layouts
bool | copied_layouts
uint8 | anim_frames
uint8 | anim_status
uint8 | anim_speed
uint16 | anim_triggers
struct SpriteGroup * | spritegroup [NUM_CARGO+3]
| NUM_CARGO real cargo plus three pseudo cargo sprite groups.

## Detailed Description

Definition at line 47 of file newgrf_station.h.

## Field Documentation

uint16 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 81 of file newgrf_station.h.

byte StationSpec::disallowed_lengths

Bitmask of platform lengths available for the station.

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

Definition at line 65 of file newgrf_station.h.

Referenced by BuildRailStationWindow::CheckSelectedSize(), CmdBuildRailStation(), BuildRailStationWindow::OnClick(), and BuildRailStationWindow::OnPaint().

byte StationSpec::disallowed_platforms

Bitmask of number of platforms available for the station.

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

Definition at line 60 of file newgrf_station.h.

Referenced by BuildRailStationWindow::CheckSelectedSize(), CmdBuildRailStation(), BuildRailStationWindow::OnClick(), and BuildRailStationWindow::OnPaint().

struct SpriteGroup* StationSpec::spritegroup[NUM_CARGO+3]`[read]`

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 108 of file newgrf_station.h.

uint StationSpec::tiles

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

Definition at line 74 of file newgrf_station.h.

Referenced by DrawStationTile().

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

- src/newgrf_station.h