MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / GetName

Method GetName

src/script/api/script_road.cpp:29–34  ·  view source on GitHub ↗

static */

Source from the content-addressed store, hash-verified

27}
28
29/* static */ std::optional<std::string> ScriptRoad::GetName(RoadType road_type)
30{
31 if (!IsRoadTypeAvailable(road_type)) return std::nullopt;
32
33 return ::StrMakeValid(::GetString(GetRoadTypeInfo((::RoadType)road_type)->strings.name), {});
34}
35
36/* static */ bool ScriptRoad::IsRoadTile(TileIndex tile)
37{

Callers 15

ResetConfigMethod · 0.45
ConstructorMethod · 0.45
GetScriptNameMethod · 0.45
FindInfoMethod · 0.45
GetTextMethod · 0.45
DrawWidgetMethod · 0.45
ChangeScriptMethod · 0.45
GetWidgetStringMethod · 0.45
GetWidgetStringMethod · 0.45
script_scanner.cppFile · 0.45
GetConsoleListMethod · 0.45
SetValueMethod · 0.45

Calls 3

GetRoadTypeInfoFunction · 0.85
StrMakeValidFunction · 0.50
GetStringFunction · 0.50

Tested by

no test coverage detected