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

Function GetPreviewRunningCostString

src/engine_gui.cpp:173–176  ·  view source on GitHub ↗

* Get preview running cost string for an engine. * @param e Engine. * @returns Formatted string of running cost. */

Source from the content-addressed store, hash-verified

171 * @returns Formatted string of running cost.
172 */
173static std::string GetPreviewRunningCostString(const Engine &e)
174{
175 return GetString(TimerGameEconomy::UsingWallclockUnits() ? STR_ENGINE_PREVIEW_RUNCOST_PERIOD : STR_ENGINE_PREVIEW_RUNCOST_YEAR, e.GetRunningCost());
176}
177
178static std::string GetTrainEngineInfoString(const Engine &e)
179{

Callers 4

GetTrainEngineInfoStringFunction · 0.85
GetShipEngineInfoStringFunction · 0.85

Calls 2

GetStringFunction · 0.70
GetRunningCostMethod · 0.45

Tested by

no test coverage detected