* Ensure engine is not set as the last used variant for any other engine. * @param engine_id Engine being removed. * @param type Type of engine. */
| 633 | * @param type Type of engine. |
| 634 | */ |
| 635 | static void ClearLastVariant(EngineID engine_id, VehicleType type) |
| 636 | { |
| 637 | for (Engine *e : Engine::IterateType(type)) { |
| 638 | if (e->display_last_variant == engine_id) e->display_last_variant = EngineID::Invalid(); |
| 639 | } |
| 640 | } |
| 641 | |
| 642 | /** |
| 643 | * Update #Engine::reliability and (if needed) update the engine GUIs. |
no test coverage detected