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

Function IsNewGRFInspectable

src/newgrf_debug_gui.cpp:748–753  ·  view source on GitHub ↗

* Can we inspect the data given a certain feature and index. * The index is normally an in-game location/identifier, such * as a TileIndex or an IndustryID depending on the feature * we want to inspect. * @param feature The feature we want to inspect. * @param index The index/identifier of the feature to inspect. * @return true if there is something to show. */

Source from the content-addressed store, hash-verified

746 * @return true if there is something to show.
747 */
748bool IsNewGRFInspectable(GrfSpecFeature feature, uint index)
749{
750 const NIFeature *nif = GetFeature(GetInspectWindowNumber(feature, index));
751 if (nif == nullptr) return false;
752 return nif->helper->IsInspectable(index);
753}
754
755/**
756 * Get the GrfSpecFeature associated with the tile.

Callers 4

ShowNewGRFInspectWindowFunction · 0.85
IsNewGRFInspectableMethod · 0.85
IsNewGRFInspectableMethod · 0.85
IsNewGRFInspectableMethod · 0.85

Calls 3

GetFeatureFunction · 0.85
GetInspectWindowNumberFunction · 0.85
IsInspectableMethod · 0.45

Tested by

no test coverage detected