2007-06-01 11:41:02 +00:00
|
|
|
/* $Id$ */
|
|
|
|
|
2009-08-21 20:21:05 +00:00
|
|
|
/*
|
|
|
|
* This file is part of OpenTTD.
|
|
|
|
* 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.
|
|
|
|
* 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.
|
|
|
|
* 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/>.
|
|
|
|
*/
|
|
|
|
|
2008-05-06 15:11:33 +00:00
|
|
|
/** @file articulated_vehicles.h Functions related to articulated vehicles. */
|
2007-06-01 11:41:02 +00:00
|
|
|
|
|
|
|
#ifndef ARTICULATED_VEHICLES_H
|
|
|
|
#define ARTICULATED_VEHICLES_H
|
|
|
|
|
2007-12-27 13:35:39 +00:00
|
|
|
#include "vehicle_type.h"
|
2008-03-28 18:00:38 +00:00
|
|
|
#include "engine_type.h"
|
2015-10-12 19:06:59 +00:00
|
|
|
#include <vector>
|
2007-12-27 13:35:39 +00:00
|
|
|
|
2007-09-17 04:23:03 +00:00
|
|
|
uint CountArticulatedParts(EngineID engine_type, bool purchase_window);
|
2015-10-12 19:06:59 +00:00
|
|
|
void GetArticulatedPartsEngineIDs(EngineID engine_type, bool purchase_window, std::vector<EngineID> &ids);
|
2009-10-06 19:52:38 +00:00
|
|
|
CargoArray GetCapacityOfArticulatedParts(EngineID engine);
|
2009-10-06 19:30:31 +00:00
|
|
|
void AddArticulatedParts(Vehicle *first);
|
2018-05-21 21:08:39 +00:00
|
|
|
void GetArticulatedRefitMasks(EngineID engine, bool include_initial_cargo_type, CargoTypes *union_mask, CargoTypes *intersection_mask);
|
|
|
|
CargoTypes GetUnionOfArticulatedRefitMasks(EngineID engine, bool include_initial_cargo_type);
|
|
|
|
CargoTypes GetIntersectionOfArticulatedRefitMasks(EngineID engine, bool include_initial_cargo_type);
|
2011-12-15 21:56:00 +00:00
|
|
|
bool IsArticulatedVehicleCarryingDifferentCargoes(const Vehicle *v, CargoID *cargo_type);
|
2009-02-27 20:40:39 +00:00
|
|
|
bool IsArticulatedVehicleRefittable(EngineID engine);
|
2012-03-14 20:49:54 +00:00
|
|
|
bool IsArticulatedEngine(EngineID engine_type);
|
2009-03-13 21:28:40 +00:00
|
|
|
void CheckConsistencyOfArticulatedVehicle(const Vehicle *v);
|
|
|
|
|
2007-06-01 11:41:02 +00:00
|
|
|
|
|
|
|
#endif /* ARTICULATED_VEHICLES_H */
|