OpenTTD Source 20250502-master-ge0a9c7d818
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.
 
Money GetClearCost (Price category) const
 Get the cost for clearing a road stop of this type.
 

Static Public Member Functions

static const RoadStopSpecGet (uint16_t index)
 

Data Fields

CargoGRFFileProps grf_prop
 Link to NewGRF.
 
StringID name
 Name of this stop.
 
RoadStopAvailabilityType stop_type = ROADSTOPTYPE_ALL
 
RoadStopDrawModes draw_mode = {RoadStopDrawMode::Road, RoadStopDrawMode::Overlay}
 
RoadStopCallbackMasks callback_mask {}
 
RoadStopSpecFlags flags {}
 
CargoTypes cargo_triggers = 0
 Bitmask of cargo types which cause trigger re-randomizing.
 
AnimationInfo< StationAnimationTriggersanimation
 
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.
 
std::vector< BadgeIDbadges
 
- 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 128 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 153 of file newgrf_roadstop.h.

References GetPrice(), and GRFFilePropsBase::grffile.

Referenced by CmdBuildRoadStop(), and CmdBuildRoadWaypoint().

◆ 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 159 of file newgrf_roadstop.h.

References GetPrice(), and GRFFilePropsBase::grffile.

Referenced by RemoveRoadStop(), and RemoveRoadWaypointStop().

Field Documentation

◆ animation

AnimationInfo<StationAnimationTriggers> RoadStopSpec::animation

Definition at line 139 of file newgrf_roadstop.h.

◆ badges

std::vector<BadgeID> RoadStopSpec::badges

Definition at line 147 of file newgrf_roadstop.h.

◆ bridge_disallowed_pillars

uint8_t RoadStopSpec::bridge_disallowed_pillars[6]

Disallowed pillar flags for a bridge above.

Definition at line 142 of file newgrf_roadstop.h.

◆ bridge_height

uint8_t RoadStopSpec::bridge_height[6]

Minimum height for a bridge above, 0 for none.

Definition at line 141 of file newgrf_roadstop.h.

◆ build_cost_multiplier

uint8_t RoadStopSpec::build_cost_multiplier = 16

Build cost multiplier per tile.

Definition at line 144 of file newgrf_roadstop.h.

◆ callback_mask

RoadStopCallbackMasks RoadStopSpec::callback_mask {}

Definition at line 134 of file newgrf_roadstop.h.

◆ cargo_triggers

CargoTypes RoadStopSpec::cargo_triggers = 0

Bitmask of cargo types which cause trigger re-randomizing.

Definition at line 137 of file newgrf_roadstop.h.

Referenced by TriggerRoadStopRandomisation().

◆ clear_cost_multiplier

uint8_t RoadStopSpec::clear_cost_multiplier = 16

Clear cost multiplier per tile.

Definition at line 145 of file newgrf_roadstop.h.

◆ draw_mode

Definition at line 133 of file newgrf_roadstop.h.

◆ flags

RoadStopSpecFlags RoadStopSpec::flags {}

Definition at line 135 of file newgrf_roadstop.h.

◆ grf_prop

CargoGRFFileProps RoadStopSpec::grf_prop

Link to NewGRF.

Definition at line 129 of file newgrf_roadstop.h.

Referenced by CmdBuildRoadStop(), RoadStopScopeResolver::GetVariable(), and IsRoadStopAvailable().

◆ name

StringID RoadStopSpec::name

Name of this stop.

Definition at line 130 of file newgrf_roadstop.h.

◆ stop_type

RoadStopAvailabilityType RoadStopSpec::stop_type = ROADSTOPTYPE_ALL

Definition at line 132 of file newgrf_roadstop.h.


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