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

Method IsBus

src/roadveh_cmd.cpp:82–86  ·  view source on GitHub ↗

* Check whether a roadvehicle is a bus * @return true if bus */

Source from the content-addressed store, hash-verified

80 * @return true if bus
81 */
82bool RoadVehicle::IsBus() const
83{
84 assert(this->IsFrontEngine());
85 return IsCargoInClass(this->cargo_type, CargoClass::Passengers);
86}
87
88/**
89 * Get the width of a road vehicle image in the GUI.

Callers 10

CmdCloneOrderFunction · 0.80
NewsWindowMethod · 0.80
RoadVehArrivesAtFunction · 0.80
RoadFindPathToDestFunction · 0.80
GetPrimaryRoadStopMethod · 0.80
NetworkGetCompanyStatsFunction · 0.80
SetDestinationMethod · 0.80
ChooseRoadTrackMethod · 0.80

Calls 2

IsCargoInClassFunction · 0.85
IsFrontEngineMethod · 0.80

Tested by

no test coverage detected