* Determine whether an engine type is a wagon (and not a loco). * @param index %Engine getting queried. * @return Whether the queried engine is a wagon. */
| 622 | * @return Whether the queried engine is a wagon. |
| 623 | */ |
| 624 | static bool IsWagon(EngineID index) |
| 625 | { |
| 626 | const Engine *e = Engine::Get(index); |
| 627 | return e->type == VEH_TRAIN && e->VehInfo<RailVehicleInfo>().railveh_type == RAILVEH_WAGON; |
| 628 | } |
| 629 | |
| 630 | /** |
| 631 | * Ensure engine is not set as the last used variant for any other engine. |
no outgoing calls
no test coverage detected