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

Method HasChainIndex

src/newgrf_debug_gui.cpp:296–300  ·  view source on GitHub ↗

* Check whether this feature has chain index, i.e. refers to ground vehicles. */

Source from the content-addressed store, hash-verified

294 * Check whether this feature has chain index, i.e. refers to ground vehicles.
295 */
296 bool HasChainIndex() const
297 {
298 GrfSpecFeature f = GetFeatureNum(this->window_number);
299 return f == GSF_TRAINS || f == GSF_ROADVEHICLES;
300 }
301
302 /**
303 * Get the feature index.

Callers 5

GetFeatureIndexMethod · 0.95
ValidateChainIndexMethod · 0.95
UpdateWidgetSizeMethod · 0.95
OnClickMethod · 0.95
OnInvalidateDataMethod · 0.95

Calls 1

GetFeatureNumFunction · 0.85

Tested by

no test coverage detected