|
OpenTTD Source 20260206-master-g4d4e37dbf1
|
Public Member Functions | |
| bool | UsesOverlay () const |
| RoadType | Index () const |
| Get the RoadType for this RoadTypeInfo. | |
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. | |
| FlatSet< RoadTypeLabel > | alternate_labels |
| Road type labels this type provides in addition to the main label. | |
| PixelColour | 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 GRFFile * | grffile [ROTSG_END] |
| NewGRF providing the Action3 for the roadtype. | |
| const SpriteGroup * | group [ROTSG_END] |
| Sprite groups for resolving sprites. | |
| std::vector< BadgeID > | badges |
| RoadType RoadTypeInfo::Index | ( | ) | const |
Get the RoadType for this RoadTypeInfo.
Definition at line 30 of file road.cpp.
References ROADTYPE_END.
Referenced by AllocateRoadType(), and InitRoadTypes().
| FlatSet<RoadTypeLabel> RoadTypeInfo::alternate_labels |
Road type labels this type provides in addition to the main label.
Definition at line 126 of file road.h.
Referenced by AllocateRoadType(), and GetRoadTypeByLabel().
| SpriteID RoadTypeInfo::auto_road |
button for the autoroad construction
Definition at line 61 of file road.h.
Referenced by BuildRoadToolbarWindow::OnInit().
| CursorID RoadTypeInfo::autoroad |
Cursor for autorail tool.
Definition at line 70 of file road.h.
Referenced by BuildRoadToolbarWindow::GetCursorForWidget().
| StringID RoadTypeInfo::build_caption |
Caption of the build vehicle GUI for this rail type.
Definition at line 80 of file road.h.
Referenced by BuildVehicleWindow::GetWidgetString(), and RoadTypeChangeInfo().
| SpriteID RoadTypeInfo::build_depot |
button for building depots
Definition at line 62 of file road.h.
Referenced by BuildRoadToolbarWindow::OnInit().
| SpriteID RoadTypeInfo::build_tunnel |
button for building a tunnel
Definition at line 63 of file road.h.
Referenced by BuildRoadToolbarWindow::OnInit().
| SpriteID RoadTypeInfo::build_x_road |
button for building single rail in X direction
Definition at line 59 of file road.h.
Referenced by BuildRoadToolbarWindow::OnInit().
| SpriteID RoadTypeInfo::build_y_road |
button for building single rail in Y direction
Definition at line 60 of file road.h.
Referenced by BuildRoadToolbarWindow::OnInit().
| SpriteID RoadTypeInfo::convert_road |
button for converting road types
Cursor for converting road types.
Definition at line 64 of file road.h.
Referenced by BuildRoadToolbarWindow::GetCursorForWidget(), and BuildRoadToolbarWindow::OnInit().
| uint16_t RoadTypeInfo::cost_multiplier |
Cost multiplier for building this road type.
Definition at line 106 of file road.h.
Referenced by RoadTypeChangeInfo().
| CursorID RoadTypeInfo::depot |
Cursor for building a depot.
Definition at line 71 of file road.h.
Referenced by BuildRoadToolbarWindow::GetCursorForWidget().
| StringID RoadTypeInfo::err_build_road |
Building a normal piece of road.
Definition at line 84 of file road.h.
Referenced by BuildRoadToolbarWindow::OnPlaceMouseUp().
| StringID RoadTypeInfo::err_build_station[2] |
Building a bus or truck station.
Definition at line 87 of file road.h.
Referenced by BuildRoadToolbarWindow::OnPlaceMouseUp().
| StringID RoadTypeInfo::err_convert_road |
Converting a road type.
Definition at line 89 of file road.h.
Referenced by BuildRoadToolbarWindow::OnPlaceMouseUp().
| StringID RoadTypeInfo::err_depot |
Building a depot.
Definition at line 86 of file road.h.
Referenced by BuildRoadToolbarWindow::OnPlaceObject().
| StringID RoadTypeInfo::err_remove_road |
Removing a normal piece of road.
Definition at line 85 of file road.h.
Referenced by BuildRoadToolbarWindow::OnPlaceMouseUp().
| StringID RoadTypeInfo::err_remove_station[2] |
Removing of a bus or truck station.
Definition at line 88 of file road.h.
Referenced by BuildRoadToolbarWindow::OnPlaceMouseUp().
| RoadTypeFlags RoadTypeInfo::flags |
Bit mask of road type flags.
Definition at line 101 of file road.h.
Referenced by AllocateRoadType(), DrawRoadDepotSprite(), DrawTile_Road(), GetTownRoadType(), GetTownRoadTypeFirstIntroductionDate(), HasRoadCatenary(), HasRoadTypeAvail(), InitRoadTypes(), RoadNoLevelCrossing(), RoadTypeChangeInfo(), and TownCanGrowRoad().
| const GRFFile* RoadTypeInfo::grffile[ROTSG_END] |
NewGRF providing the Action3 for the roadtype.
nullptr if not available.
Definition at line 161 of file road.h.
Referenced by RoadTypeMapSpriteGroupHandler< TRoadTramType >::MapSpecific(), and RoadTypeChangeInfo().
| const SpriteGroup* RoadTypeInfo::group[ROTSG_END] |
Sprite groups for resolving sprites.
Definition at line 166 of file road.h.
Referenced by GetCustomRoadSprite(), RoadTypeMapSpriteGroupHandler< TRoadTramType >::MapSpecific(), and RoadTypeResolverObject::RoadTypeResolverObject().
| struct { ... } RoadTypeInfo::gui_sprites |
struct containing the sprites for the road GUI.
Referenced by BuildRoadToolbarWindow::OnInit().
| RoadTypes RoadTypeInfo::introduces_roadtypes |
Bitmask of which other roadtypes are introduced when this roadtype is introduced.
Definition at line 151 of file road.h.
Referenced by AddDateIntroducedRoadTypes(), AllocateRoadType(), GetCompanyRoadTypes(), GetRoadTypes(), and RoadTypeChangeInfo().
| 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 140 of file road.h.
Referenced by AddDateIntroducedRoadTypes(), AllocateRoadType(), GetTownRoadType(), GetTownRoadTypeFirstIntroductionDate(), HasRoadTypeAvail(), and RoadTypeChangeInfo().
| 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 146 of file road.h.
Referenced by AddDateIntroducedRoadTypes(), and RoadTypeChangeInfo().
| RoadTypeLabel RoadTypeInfo::label |
Unique 32 bit road type identifier.
Definition at line 121 of file road.h.
Referenced by AddDateIntroducedRoadTypes(), AllocateRoadType(), GetReverseRoadTypeTranslation(), GetRoadTypeByLabel(), HasRoadTypeAvail(), InitRoadTypes(), and ROTTChunkHandler::Save().
| uint16_t RoadTypeInfo::maintenance_multiplier |
Cost multiplier for maintenance of this road type.
Definition at line 111 of file road.h.
Referenced by RoadTypeChangeInfo().
| PixelColour RoadTypeInfo::map_colour |
Colour on mini-map.
Definition at line 131 of file road.h.
Referenced by GetSmallMapRoutesPixels(), and RoadTypeChangeInfo().
| uint16_t RoadTypeInfo::max_speed |
Maximum speed for vehicles travelling on this road type.
Definition at line 116 of file road.h.
Referenced by RoadVehicle::GetMaxTrackSpeed(), CFollowTrackT< TRANSPORT_WATER, Ship, true >::GetSpeedLimit(), GetTownRoadType(), BuildRoadToolbarWindow::GetWidgetString(), and RoadTypeChangeInfo().
| StringID RoadTypeInfo::menu_text |
Name of this rail type in the main toolbar dropdown.
Definition at line 79 of file road.h.
Referenced by RoadTypeChangeInfo().
| StringID RoadTypeInfo::name |
Name of this rail type.
Definition at line 77 of file road.h.
Referenced by RoadTypeChangeInfo(), and CompanyInfrastructureWindow::UpdateWidgetSize().
| StringID RoadTypeInfo::new_engine |
Name of an engine for this type of road in the engine preview GUI.
Definition at line 82 of file road.h.
Referenced by GetEngineCategoryName(), and RoadTypeChangeInfo().
| StringID RoadTypeInfo::picker_title[2] |
| StringID RoadTypeInfo::picker_tooltip[2] |
| RoadTypes RoadTypeInfo::powered_roadtypes |
bitmask to the OTHER roadtypes on which a vehicle of THIS roadtype generates power
Definition at line 96 of file road.h.
Referenced by AfterLoadVehiclesPhase2(), AllocateRoadType(), CheckAutoreplaceValidity(), HasPowerOnRoad(), IsEngineBuildable(), and RoadTypeChangeInfo().
| StringID RoadTypeInfo::replace_text |
Text used in the autoreplace GUI.
Definition at line 81 of file road.h.
Referenced by ReplaceVehicleWindow::GetWidgetString(), RoadTypeChangeInfo(), and ReplaceVehicleWindow::UpdateWidgetSize().
| CursorID RoadTypeInfo::road_nwse |
Cursor for building rail in Y direction.
Definition at line 69 of file road.h.
Referenced by BuildRoadToolbarWindow::GetCursorForWidget().
| CursorID RoadTypeInfo::road_swne |
Cursor for building rail in X direction.
Definition at line 68 of file road.h.
Referenced by BuildRoadToolbarWindow::GetCursorForWidget().
| uint8_t RoadTypeInfo::sorting_order |
The sorting order of this roadtype for the toolbar dropdown.
Definition at line 156 of file road.h.
Referenced by AllocateRoadType(), CompareRoadTypes(), and RoadTypeChangeInfo().
| StringID RoadTypeInfo::toolbar_caption |
Caption in the construction toolbar GUI for this rail type.
Definition at line 78 of file road.h.
Referenced by BuildRoadToolbarWindow::GetWidgetString(), and RoadTypeChangeInfo().
| CursorID RoadTypeInfo::tunnel |
Cursor for building a tunnel.
Definition at line 72 of file road.h.
Referenced by BuildRoadToolbarWindow::GetCursorForWidget().