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

Method GetFeatureIndex

src/newgrf_debug_gui.cpp:306–316  ·  view source on GitHub ↗

* Get the feature index. * @return the feature index */

Source from the content-addressed store, hash-verified

304 * @return the feature index
305 */
306 uint GetFeatureIndex() const
307 {
308 uint index = ::GetFeatureIndex(this->window_number);
309 if (this->chain_index > 0) {
310 assert(this->HasChainIndex());
311 const Vehicle *v = Vehicle::Get(index);
312 v = v->Move(this->chain_index);
313 if (v != nullptr) index = v->index.base();
314 }
315 return index;
316 }
317
318 /**
319 * Ensure that this->chain_index is in range.

Callers 6

NewGRFInspectWindowMethod · 0.95
GetWidgetStringMethod · 0.95
DrawMainPanelWidgetMethod · 0.95
OnClickMethod · 0.95
OnInvalidateDataMethod · 0.95

Calls 4

HasChainIndexMethod · 0.95
GetFeatureIndexFunction · 0.85
MoveMethod · 0.80
baseMethod · 0.45

Tested by

no test coverage detected