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

Method MapDefault

src/newgrf/newgrf_act3.cpp:180–189  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

178 }
179
180 void MapDefault(uint16_t local_id, const SpriteGroup *group) override
181 {
182 if (T *spec = GetSpec<T>(_cur_gps.grffile, local_id); spec == nullptr) {
183 GrfMsg(1, "MapSpriteGroup: {} undefined, skipping.", local_id);
184 } else {
185 spec->grf_prop.SetSpriteGroup(StandardSpriteGroup::Default, group);
186 spec->grf_prop.SetGRFFile(_cur_gps.grffile);
187 spec->grf_prop.local_id = local_id;
188 }
189 }
190};
191
192/** Common handler for mapping sprite groups for features which support cargo-type specific sprites. */

Callers

nothing calls this directly

Calls 2

SetGRFFileMethod · 0.80
SetSpriteGroupMethod · 0.45

Tested by

no test coverage detected