Checks whether the vehicle may be refitted at the moment.*/
| 2943 | |
| 2944 | /** Checks whether the vehicle may be refitted at the moment.*/ |
| 2945 | static bool IsVehicleRefittable(const Vehicle *v) |
| 2946 | { |
| 2947 | if (!v->IsStoppedInDepot()) return false; |
| 2948 | |
| 2949 | do { |
| 2950 | if (IsEngineRefittable(v->engine_type)) return true; |
| 2951 | } while (v->IsGroundVehicle() && (v = v->Next()) != nullptr); |
| 2952 | |
| 2953 | return false; |
| 2954 | } |
| 2955 | |
| 2956 | /** Window manager class for viewing a vehicle. */ |
| 2957 | struct VehicleViewWindow : Window { |
no test coverage detected