* Initializes the #EngineOverrideManager with the default engines. */
| 506 | * Initializes the #EngineOverrideManager with the default engines. |
| 507 | */ |
| 508 | void EngineOverrideManager::ResetToDefaultMapping() |
| 509 | { |
| 510 | EngineID id = EngineID::Begin(); |
| 511 | for (VehicleType type = VEH_TRAIN; type <= VEH_AIRCRAFT; type++) { |
| 512 | auto &map = this->mappings[type]; |
| 513 | map.clear(); |
| 514 | for (uint internal_id = 0; internal_id < _engine_counts[type]; internal_id++, ++id) { |
| 515 | map.emplace_back(INVALID_GRFID, internal_id, type, internal_id, id); |
| 516 | } |
| 517 | } |
| 518 | } |
| 519 | |
| 520 | /** |
| 521 | * Looks up an EngineID in the EngineOverrideManager |
no test coverage detected