* Get a multi-line string with some technical data, describing the engine. * @param engine Engine to describe. * @return String describing the engine. * @post \c DParam array is set up for printing the string. */
| 294 | * @post \c DParam array is set up for printing the string. |
| 295 | */ |
| 296 | std::string GetEngineInfoString(EngineID engine) |
| 297 | { |
| 298 | const Engine &e = *Engine::Get(engine); |
| 299 | |
| 300 | switch (e.type) { |
| 301 | case VEH_TRAIN: |
| 302 | return GetTrainEngineInfoString(e); |
| 303 | |
| 304 | case VEH_ROAD: |
| 305 | return GetRoadVehEngineInfoString(e); |
| 306 | |
| 307 | case VEH_SHIP: |
| 308 | return GetShipEngineInfoString(e); |
| 309 | |
| 310 | case VEH_AIRCRAFT: |
| 311 | return GetAircraftEngineInfoString(e); |
| 312 | |
| 313 | default: NOT_REACHED(); |
| 314 | } |
| 315 | } |
| 316 | |
| 317 | /** |
| 318 | * Draw an engine. |
no test coverage detected