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

Function GetShipEngineInfoString

src/engine_gui.cpp:274–287  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

272}
273
274static std::string GetShipEngineInfoString(const Engine &e)
275{
276 std::stringstream res;
277
278 res << GetString(STR_ENGINE_PREVIEW_COST_MAX_SPEED, e.GetCost(), PackVelocity(e.GetDisplayMaxSpeed(), e.type));
279 res << '\n';
280
281 res << GetPreviewRunningCostString(e);
282 res << '\n';
283
284 res << GetString(STR_ENGINE_PREVIEW_CAPACITY, e.GetDefaultCargoType(), e.GetDisplayDefaultCapacity());
285
286 return res.str();
287}
288
289
290/**

Callers 1

GetEngineInfoStringFunction · 0.85

Calls 8

PackVelocityFunction · 0.85
GetDefaultCargoTypeMethod · 0.80
GetStringFunction · 0.70
GetCostMethod · 0.45
GetDisplayMaxSpeedMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected