(svn r27985) -Codechange: Convert VA2 switches into ones with non-overlapping ranges...
[openttd.git] / src / script / api / script_vehiclelist.hpp
blob7df3a2bb012caa434048679d479d9c34597255d5
1 /* $Id$ */
3 /*
4 * This file is part of OpenTTD.
5 * 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.
6 * 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.
7 * 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/>.
8 */
10 /** @file script_vehiclelist.hpp List all the vehicles (you own). */
12 #ifndef SCRIPT_VEHICLELIST_HPP
13 #define SCRIPT_VEHICLELIST_HPP
15 #include "script_list.hpp"
16 #include "script_vehicle.hpp"
18 /**
19 * Creates a list of vehicles of which you are the owner.
20 * @api ai game
21 * @ingroup ScriptList
23 class ScriptVehicleList : public ScriptList {
24 public:
25 ScriptVehicleList();
28 /**
29 * Creates a list of vehicles that have orders to a given station.
30 * @api ai game
31 * @ingroup ScriptList
33 class ScriptVehicleList_Station : public ScriptList {
34 public:
35 /**
36 * @param station_id The station to get the list of vehicles from, which have orders to it.
37 * @pre ScriptBaseStation::IsValidBaseStation(station_id)
39 ScriptVehicleList_Station(StationID station_id);
42 /**
43 * Creates a list of vehicles that have orders to a given depot.
44 * The list is created with a tile. If the tile is part of an airport all
45 * aircraft having a depot order on a hangar of that airport will be
46 * returned. For all other vehicle types the tile has to be a depot or
47 * an empty list will be returned.
48 * @api ai game
49 * @ingroup ScriptList
51 class ScriptVehicleList_Depot : public ScriptList {
52 public:
53 /**
54 * @param tile The tile of the depot to get the list of vehicles from, which have orders to it.
56 ScriptVehicleList_Depot(TileIndex tile);
59 /**
60 * Creates a list of vehicles that share orders.
61 * @api ai game
62 * @ingroup ScriptList
64 class ScriptVehicleList_SharedOrders : public ScriptList {
65 public:
66 /**
67 * @param vehicle_id The vehicle that the rest shared orders with.
69 ScriptVehicleList_SharedOrders(VehicleID vehicle_id);
72 /**
73 * Creates a list of vehicles that are in a group.
74 * @api ai
75 * @ingroup ScriptList
77 class ScriptVehicleList_Group : public ScriptList {
78 public:
79 /**
80 * @param group_id The ID of the group the vehicles are in.
82 ScriptVehicleList_Group(GroupID group_id);
85 /**
86 * Creates a list of vehicles that are in the default group.
87 * @api ai
88 * @ingroup ScriptList
90 class ScriptVehicleList_DefaultGroup : public ScriptList {
91 public:
92 /**
93 * @param vehicle_type The VehicleType to get the list of vehicles for.
95 ScriptVehicleList_DefaultGroup(ScriptVehicle::VehicleType vehicle_type);
98 #endif /* SCRIPT_VEHICLELIST_HPP */