OpenTTD Source 20241224-master-gf74b0cf984
RoadTypeInfo Class Reference

Public Member Functions

bool UsesOverlay () const
 

Data Fields

struct { 
 
   SpriteID   build_x_road 
 button for building single rail in X direction More...
 
   SpriteID   build_y_road 
 button for building single rail in Y direction More...
 
   SpriteID   auto_road 
 button for the autoroad construction More...
 
   SpriteID   build_depot 
 button for building depots More...
 
   SpriteID   build_tunnel 
 button for building a tunnel More...
 
   SpriteID   convert_road 
 button for converting road types More...
 
gui_sprites 
 struct containing the sprites for the road GUI.
 
struct { 
 
   CursorID   road_swne 
 Cursor for building rail in X direction. More...
 
   CursorID   road_nwse 
 Cursor for building rail in Y direction. More...
 
   CursorID   autoroad 
 Cursor for autorail tool. More...
 
   CursorID   depot 
 Cursor for building a depot. More...
 
   CursorID   tunnel 
 Cursor for building a tunnel. More...
 
   SpriteID   convert_road 
 Cursor for converting road types. More...
 
cursor 
 Cursors associated with the road type.
 
struct { 
 
   StringID   name 
 Name of this rail type. More...
 
   StringID   toolbar_caption 
 Caption in the construction toolbar GUI for this rail type. More...
 
   StringID   menu_text 
 Name of this rail type in the main toolbar dropdown. More...
 
   StringID   build_caption 
 Caption of the build vehicle GUI for this rail type. More...
 
   StringID   replace_text 
 Text used in the autoreplace GUI. More...
 
   StringID   new_engine 
 Name of an engine for this type of road in the engine preview GUI. More...
 
   StringID   err_build_road 
 Building a normal piece of road. More...
 
   StringID   err_remove_road 
 Removing a normal piece of road. More...
 
   StringID   err_depot 
 Building a depot. More...
 
   StringID   err_build_station [2] 
 Building a bus or truck station. More...
 
   StringID   err_remove_station [2] 
 Removing of a bus or truck station. More...
 
   StringID   err_convert_road 
 Converting a road type. More...
 
   StringID   picker_title [2] 
 Title for the station picker for bus or truck stations. More...
 
   StringID   picker_tooltip [2] 
 Tooltip for the station picker for bus or truck stations. More...
 
strings 
 Strings associated with the rail type.
 
RoadTypes powered_roadtypes
 bitmask to the OTHER roadtypes on which a vehicle of THIS roadtype generates power
 
RoadTypeFlags flags
 Bit mask of road type flags.
 
uint16_t cost_multiplier
 Cost multiplier for building this road type.
 
uint16_t maintenance_multiplier
 Cost multiplier for maintenance of this road type.
 
uint16_t max_speed
 Maximum speed for vehicles travelling on this road type.
 
RoadTypeLabel label
 Unique 32 bit road type identifier.
 
RoadTypeLabelList alternate_labels
 Road type labels this type provides in addition to the main label.
 
uint8_t map_colour
 Colour on mini-map.
 
TimerGameCalendar::Date introduction_date
 Introduction date.
 
RoadTypes introduction_required_roadtypes
 Bitmask of roadtypes that are required for this roadtype to be introduced at a given introduction_date.
 
RoadTypes introduces_roadtypes
 Bitmask of which other roadtypes are introduced when this roadtype is introduced.
 
uint8_t sorting_order
 The sorting order of this roadtype for the toolbar dropdown.
 
const GRFFilegrffile [ROTSG_END]
 NewGRF providing the Action3 for the roadtype.
 
const SpriteGroupgroup [ROTSG_END]
 Sprite groups for resolving sprites.
 

Detailed Description

Definition at line 78 of file road.h.

Member Function Documentation

◆ UsesOverlay()

bool RoadTypeInfo::UsesOverlay ( ) const
inline

Definition at line 194 of file road.h.

Field Documentation

◆ alternate_labels

RoadTypeLabelList RoadTypeInfo::alternate_labels

Road type labels this type provides in addition to the main label.

Definition at line 152 of file road.h.

Referenced by AllocateRoadType(), and GetRoadTypeByLabel().

◆ auto_road

SpriteID RoadTypeInfo::auto_road

button for the autoroad construction

Definition at line 87 of file road.h.

Referenced by BuildRoadToolbarWindow::OnInit().

◆ autoroad

CursorID RoadTypeInfo::autoroad

Cursor for autorail tool.

Definition at line 96 of file road.h.

Referenced by BuildRoadToolbarWindow::OnClick().

◆ build_caption

StringID RoadTypeInfo::build_caption

Caption of the build vehicle GUI for this rail type.

Definition at line 106 of file road.h.

Referenced by RoadTypeChangeInfo(), and BuildVehicleWindow::SetStringParameters().

◆ build_depot

SpriteID RoadTypeInfo::build_depot

button for building depots

Definition at line 88 of file road.h.

Referenced by BuildRoadToolbarWindow::OnInit().

◆ build_tunnel

SpriteID RoadTypeInfo::build_tunnel

button for building a tunnel

Definition at line 89 of file road.h.

Referenced by BuildRoadToolbarWindow::OnInit().

◆ build_x_road

SpriteID RoadTypeInfo::build_x_road

button for building single rail in X direction

Definition at line 85 of file road.h.

Referenced by BuildRoadToolbarWindow::OnInit().

◆ build_y_road

SpriteID RoadTypeInfo::build_y_road

button for building single rail in Y direction

Definition at line 86 of file road.h.

Referenced by BuildRoadToolbarWindow::OnInit().

◆ convert_road

SpriteID RoadTypeInfo::convert_road

button for converting road types

Cursor for converting road types.

Definition at line 90 of file road.h.

Referenced by BuildRoadToolbarWindow::OnClick(), and BuildRoadToolbarWindow::OnInit().

◆ cost_multiplier

uint16_t RoadTypeInfo::cost_multiplier

Cost multiplier for building this road type.

Definition at line 132 of file road.h.

Referenced by RoadTypeChangeInfo().

◆ depot

CursorID RoadTypeInfo::depot

Cursor for building a depot.

Definition at line 97 of file road.h.

Referenced by BuildRoadToolbarWindow::OnClick().

◆ err_build_road

StringID RoadTypeInfo::err_build_road

Building a normal piece of road.

Definition at line 110 of file road.h.

Referenced by BuildRoadToolbarWindow::OnPlaceMouseUp().

◆ err_build_station

StringID RoadTypeInfo::err_build_station[2]

Building a bus or truck station.

Definition at line 113 of file road.h.

Referenced by BuildRoadToolbarWindow::OnPlaceMouseUp().

◆ err_convert_road

StringID RoadTypeInfo::err_convert_road

Converting a road type.

Definition at line 115 of file road.h.

Referenced by BuildRoadToolbarWindow::OnPlaceMouseUp().

◆ err_depot

StringID RoadTypeInfo::err_depot

Building a depot.

Definition at line 112 of file road.h.

Referenced by BuildRoadToolbarWindow::OnPlaceObject().

◆ err_remove_road

StringID RoadTypeInfo::err_remove_road

Removing a normal piece of road.

Definition at line 111 of file road.h.

Referenced by BuildRoadToolbarWindow::OnPlaceMouseUp().

◆ err_remove_station

StringID RoadTypeInfo::err_remove_station[2]

Removing of a bus or truck station.

Definition at line 114 of file road.h.

Referenced by BuildRoadToolbarWindow::OnPlaceMouseUp().

◆ flags

◆ grffile

const GRFFile* RoadTypeInfo::grffile[ROTSG_END]

NewGRF providing the Action3 for the roadtype.

nullptr if not available.

Definition at line 187 of file road.h.

◆ group

const SpriteGroup* RoadTypeInfo::group[ROTSG_END]

Sprite groups for resolving sprites.

Definition at line 192 of file road.h.

Referenced by GetCustomRoadSprite(), and RoadTypeResolverObject::RoadTypeResolverObject().

◆ [struct]

struct { ... } RoadTypeInfo::gui_sprites

struct containing the sprites for the road GUI.

Note
only sprites referred to directly in the code are listed

Referenced by BuildRoadToolbarWindow::OnInit().

◆ introduces_roadtypes

RoadTypes RoadTypeInfo::introduces_roadtypes

Bitmask of which other roadtypes are introduced when this roadtype is introduced.

Definition at line 177 of file road.h.

Referenced by AddDateIntroducedRoadTypes(), AllocateRoadType(), GetCompanyRoadTypes(), GetRoadTypes(), NewVehicleAvailable(), and RoadTypeChangeInfo().

◆ introduction_date

TimerGameCalendar::Date RoadTypeInfo::introduction_date

Introduction date.

When #INVALID_DATE or a vehicle using this roadtype gets introduced earlier, the vehicle's introduction date will be used instead for this roadtype. The introduction at this date is furthermore limited by the #introduction_required_types.

Definition at line 166 of file road.h.

Referenced by AddDateIntroducedRoadTypes(), AllocateRoadType(), GetTownRoadType(), GetTownRoadTypeFirstIntroductionDate(), HasRoadTypeAvail(), and RoadTypeChangeInfo().

◆ introduction_required_roadtypes

RoadTypes RoadTypeInfo::introduction_required_roadtypes

Bitmask of roadtypes that are required for this roadtype to be introduced at a given introduction_date.

Definition at line 172 of file road.h.

Referenced by AddDateIntroducedRoadTypes(), and RoadTypeChangeInfo().

◆ label

◆ maintenance_multiplier

uint16_t RoadTypeInfo::maintenance_multiplier

Cost multiplier for maintenance of this road type.

Definition at line 137 of file road.h.

Referenced by RoadTypeChangeInfo().

◆ map_colour

uint8_t RoadTypeInfo::map_colour

Colour on mini-map.

Definition at line 157 of file road.h.

Referenced by GetSmallMapRoutesPixels(), and RoadTypeChangeInfo().

◆ max_speed

◆ menu_text

StringID RoadTypeInfo::menu_text

Name of this rail type in the main toolbar dropdown.

Definition at line 105 of file road.h.

Referenced by RoadTypeChangeInfo().

◆ name

StringID RoadTypeInfo::name

Name of this rail type.

Definition at line 103 of file road.h.

Referenced by CompanyInfrastructureWindow::DrawWidget(), RoadTypeChangeInfo(), and CompanyInfrastructureWindow::UpdateWidgetSize().

◆ new_engine

StringID RoadTypeInfo::new_engine

Name of an engine for this type of road in the engine preview GUI.

Definition at line 108 of file road.h.

Referenced by GetEngineCategoryName(), and RoadTypeChangeInfo().

◆ picker_title

StringID RoadTypeInfo::picker_title[2]

Title for the station picker for bus or truck stations.

Definition at line 117 of file road.h.

◆ picker_tooltip

StringID RoadTypeInfo::picker_tooltip[2]

Tooltip for the station picker for bus or truck stations.

Definition at line 118 of file road.h.

◆ powered_roadtypes

RoadTypes RoadTypeInfo::powered_roadtypes

bitmask to the OTHER roadtypes on which a vehicle of THIS roadtype generates power

Definition at line 122 of file road.h.

Referenced by AfterLoadVehiclesPhase2(), AllocateRoadType(), CheckAutoreplaceValidity(), CmdBuildRoadVehicle(), IsEngineBuildable(), and RoadTypeChangeInfo().

◆ replace_text

StringID RoadTypeInfo::replace_text

Text used in the autoreplace GUI.

Definition at line 107 of file road.h.

Referenced by RoadTypeChangeInfo(), ReplaceVehicleWindow::SetStringParameters(), and ReplaceVehicleWindow::UpdateWidgetSize().

◆ road_nwse

CursorID RoadTypeInfo::road_nwse

Cursor for building rail in Y direction.

Definition at line 95 of file road.h.

Referenced by BuildRoadToolbarWindow::OnClick().

◆ road_swne

CursorID RoadTypeInfo::road_swne

Cursor for building rail in X direction.

Definition at line 94 of file road.h.

Referenced by BuildRoadToolbarWindow::OnClick().

◆ sorting_order

uint8_t RoadTypeInfo::sorting_order

The sorting order of this roadtype for the toolbar dropdown.

Definition at line 182 of file road.h.

Referenced by AllocateRoadType(), CompareRoadTypes(), and RoadTypeChangeInfo().

◆ toolbar_caption

StringID RoadTypeInfo::toolbar_caption

Caption in the construction toolbar GUI for this rail type.

Definition at line 104 of file road.h.

Referenced by RoadTypeChangeInfo(), and BuildRoadToolbarWindow::SetStringParameters().

◆ tunnel

CursorID RoadTypeInfo::tunnel

Cursor for building a tunnel.

Definition at line 98 of file road.h.

Referenced by BuildRoadToolbarWindow::OnClick().


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