Change: Only resort town directory window on population change if necessary
[openttd-github.git] / src / articulated_vehicles.h
bloba98833b003b9887eb9a0ad8634ab9e54f88b25c1
1 /*
2 * This file is part of OpenTTD.
3 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
4 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
5 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
6 */
8 /** @file articulated_vehicles.h Functions related to articulated vehicles. */
10 #ifndef ARTICULATED_VEHICLES_H
11 #define ARTICULATED_VEHICLES_H
13 #include "vehicle_type.h"
14 #include "engine_type.h"
16 uint CountArticulatedParts(EngineID engine_type, bool purchase_window);
17 CargoArray GetCapacityOfArticulatedParts(EngineID engine);
18 void AddArticulatedParts(Vehicle *first);
19 void GetArticulatedRefitMasks(EngineID engine, bool include_initial_cargo_type, CargoTypes *union_mask, CargoTypes *intersection_mask);
20 CargoTypes GetUnionOfArticulatedRefitMasks(EngineID engine, bool include_initial_cargo_type);
21 CargoTypes GetIntersectionOfArticulatedRefitMasks(EngineID engine, bool include_initial_cargo_type);
22 bool IsArticulatedVehicleCarryingDifferentCargoes(const Vehicle *v, CargoID *cargo_type);
23 bool IsArticulatedVehicleRefittable(EngineID engine);
24 bool IsArticulatedEngine(EngineID engine_type);
25 void CheckConsistencyOfArticulatedVehicle(const Vehicle *v);
28 #endif /* ARTICULATED_VEHICLES_H */