| 249 | } |
| 250 | |
| 251 | static std::string GetRoadVehEngineInfoString(const Engine &e) |
| 252 | { |
| 253 | std::stringstream res; |
| 254 | |
| 255 | if (_settings_game.vehicle.roadveh_acceleration_model == AM_ORIGINAL) { |
| 256 | res << GetString(STR_ENGINE_PREVIEW_COST_MAX_SPEED, e.GetCost(), PackVelocity(e.GetDisplayMaxSpeed(), e.type)); |
| 257 | res << '\n'; |
| 258 | } else { |
| 259 | res << GetString(STR_ENGINE_PREVIEW_COST_WEIGHT, e.GetCost(), e.GetDisplayWeight()); |
| 260 | res << '\n'; |
| 261 | res << GetString(STR_ENGINE_PREVIEW_SPEED_POWER_MAX_TE, PackVelocity(e.GetDisplayMaxSpeed(), e.type), e.GetPower(), e.GetDisplayMaxTractiveEffort()); |
| 262 | res << '\n'; |
| 263 | } |
| 264 | |
| 265 | res << GetPreviewRunningCostString(e); |
| 266 | res << '\n'; |
| 267 | |
| 268 | uint capacity = GetTotalCapacityOfArticulatedParts(e.index); |
| 269 | res << GetString(STR_ENGINE_PREVIEW_CAPACITY, capacity == 0 ? INVALID_CARGO : e.GetDefaultCargoType(), capacity); |
| 270 | |
| 271 | return res.str(); |
| 272 | } |
| 273 | |
| 274 | static std::string GetShipEngineInfoString(const Engine &e) |
| 275 | { |
no test coverage detected