OpenTTD Source  20241121-master-g67a0fccfad
RoadStopSpec Struct Reference

Road stop specification. More...

#include <newgrf_roadstop.h>

Inheritance diagram for RoadStopSpec:
NewGRFSpecBase< RoadStopClassID >

Public Member Functions

Money GetBuildCost (Price category) const
 Get the cost for building a road stop of this type. More...
 
Money GetClearCost (Price category) const
 Get the cost for clearing a road stop of this type. More...
 

Static Public Member Functions

static const RoadStopSpecGet (uint16_t index)
 

Data Fields

GRFFilePropsBase< NUM_CARGO+3 > grf_prop
 Properties related the the grf file. More...
 
StringID name
 Name of this stop.
 
RoadStopAvailabilityType stop_type = ROADSTOPTYPE_ALL
 
RoadStopDrawMode draw_mode = ROADSTOP_DRAW_MODE_ROAD | ROADSTOP_DRAW_MODE_OVERLAY
 
uint8_t callback_mask = 0
 
uint16_t flags = 0
 
CargoTypes cargo_triggers = 0
 Bitmask of cargo types which cause trigger re-randomizing.
 
AnimationInfo animation
 
uint8_t bridge_height [6]
 Minimum height for a bridge above, 0 for none.
 
uint8_t bridge_disallowed_pillars [6]
 Disallowed pillar flags for a bridge above.
 
uint8_t build_cost_multiplier = 16
 Build cost multiplier per tile.
 
uint8_t clear_cost_multiplier = 16
 Clear cost multiplier per tile.
 
- Data Fields inherited from NewGRFSpecBase< RoadStopClassID >
RoadStopClassID class_index
 Class index of this spec, invalid until class is allocated.
 
uint16_t index
 Index within class of this spec, invalid until inserted into class.
 

Detailed Description

Road stop specification.

Definition at line 135 of file newgrf_roadstop.h.

Member Function Documentation

◆ GetBuildCost()

Money RoadStopSpec::GetBuildCost ( Price  category) const
inline

Get the cost for building a road stop of this type.

Returns
The cost for building.

Definition at line 164 of file newgrf_roadstop.h.

References GetPrice(), and GRFFilePropsBase< Tcnt >::grffile.

◆ GetClearCost()

Money RoadStopSpec::GetClearCost ( Price  category) const
inline

Get the cost for clearing a road stop of this type.

Returns
The cost for clearing.

Definition at line 170 of file newgrf_roadstop.h.

References GetPrice(), and GRFFilePropsBase< Tcnt >::grffile.

Field Documentation

◆ grf_prop

GRFFilePropsBase<NUM_CARGO + 3> RoadStopSpec::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 142 of file newgrf_roadstop.h.


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