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

Function AddStringForMapping

src/newgrf/newgrf_stringmapping.cpp:42–46  ·  view source on GitHub ↗

* Record a static StringID for getting translated later. * @param source Source grf-local GRFStringID. * @param func Function to call to set the mapping result. */

Source from the content-addressed store, hash-verified

40 * @param func Function to call to set the mapping result.
41 */
42void AddStringForMapping(GRFStringID source, std::function<void(StringID)> &&func)
43{
44 func(STR_UNDEFINED);
45 _string_to_grf_mapping.emplace_back(_cur_gps.grffile->grfid, source, std::move(func));
46}
47
48/**
49 * Record a static StringID for getting translated later.

Callers 11

GlobalVarChangeInfoFunction · 0.85
IndustriesChangeInfoFunction · 0.85
StationChangeInfoFunction · 0.85
RoadTypeChangeInfoFunction · 0.85
ObjectChangeInfoFunction · 0.85
RoadStopChangeInfoFunction · 0.85
CargoReserveInfoFunction · 0.85
TownHouseChangeInfoFunction · 0.85
AirportChangeInfoFunction · 0.85
RailTypeChangeInfoFunction · 0.85
BridgeChangeInfoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected