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

Method BindToClasses

src/newgrf_object.cpp:115–122  ·  view source on GitHub ↗

* Tie all ObjectSpecs to their class. */ static */

Source from the content-addressed store, hash-verified

113 * Tie all ObjectSpecs to their class.
114 */
115/* static */ void ObjectSpec::BindToClasses()
116{
117 for (auto &spec : _object_specs) {
118 if (spec.IsEnabled() && spec.class_index != INVALID_OBJECT_CLASS) {
119 ObjectClass::Assign(&spec);
120 }
121 }
122}
123
124/** This function initialize the spec arrays of objects. */
125void ResetObjects()

Callers

nothing calls this directly

Calls 1

IsEnabledMethod · 0.45

Tested by

no test coverage detected