Fix: CmdSetAutoReplace didn't validate group type and engine type match (#9950)
[openttd-github.git] / src / engine_func.h
blob97bfd0894b43f20fc5e3e20e6bed0a0b6f5845a2
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 engine_func.h Functions related to engines. */
10 #ifndef ENGINE_FUNC_H
11 #define ENGINE_FUNC_H
13 #include "engine_type.h"
14 #include "vehicle_type.h"
15 #include "company_type.h"
17 void SetupEngines();
18 void StartupEngines();
19 void CheckEngines();
21 /* Original engine data counts and offsets */
22 extern const uint8 _engine_counts[4];
23 extern const uint8 _engine_offsets[4];
25 bool IsEngineBuildable(EngineID engine, VehicleType type, CompanyID company);
26 bool IsEngineRefittable(EngineID engine);
27 void GetArticulatedVehicleCargoesAndRefits(EngineID engine, CargoArray *cargoes, CargoTypes *refits, CargoID cargo_type, uint cargo_capacity);
28 void SetYearEngineAgingStops();
29 void StartupOneEngine(Engine *e, Date aging_date);
31 uint GetTotalCapacityOfArticulatedParts(EngineID engine);
33 #endif /* ENGINE_FUNC_H */