2009-01-12 18:11:45 +01:00
|
|
|
/* $Id$ */
|
|
|
|
|
2009-08-21 22:21:05 +02: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/>.
|
|
|
|
*/
|
|
|
|
|
2011-11-30 00:07:38 +01:00
|
|
|
/** @file script_vehiclelist.hpp List all the vehicles (you own). */
|
2009-01-12 18:11:45 +01:00
|
|
|
|
2011-11-30 00:07:38 +01:00
|
|
|
#ifndef SCRIPT_VEHICLELIST_HPP
|
|
|
|
#define SCRIPT_VEHICLELIST_HPP
|
2009-01-12 18:11:45 +01:00
|
|
|
|
2011-11-30 00:07:38 +01:00
|
|
|
#include "script_list.hpp"
|
|
|
|
#include "script_vehicle.hpp"
|
2009-01-12 18:11:45 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Creates a list of vehicles of which you are the owner.
|
|
|
|
* @ingroup AIList
|
|
|
|
*/
|
2010-08-19 17:37:28 +02:00
|
|
|
class AIVehicleList : public AIList {
|
2009-01-12 18:11:45 +01:00
|
|
|
public:
|
|
|
|
AIVehicleList();
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Creates a list of vehicles that have orders to a given station.
|
|
|
|
* @ingroup AIList
|
|
|
|
*/
|
2010-08-19 17:37:28 +02:00
|
|
|
class AIVehicleList_Station : public AIList {
|
2009-01-12 18:11:45 +01:00
|
|
|
public:
|
|
|
|
/**
|
2009-08-08 18:36:06 +02:00
|
|
|
* @param station_id The station to get the list of vehicles from, which have orders to it.
|
|
|
|
* @pre AIBaseStation::IsValidBaseStation(station_id)
|
2009-01-12 18:11:45 +01:00
|
|
|
*/
|
|
|
|
AIVehicleList_Station(StationID station_id);
|
|
|
|
};
|
|
|
|
|
2009-09-09 11:46:08 +02:00
|
|
|
/**
|
|
|
|
* Creates a list of vehicles that have orders to a given depot.
|
|
|
|
* The list is created with a tile. If the tile is part of an airport all
|
|
|
|
* aircraft having a depot order on a hangar of that airport will be
|
|
|
|
* returned. For all other vehicle types the tile has to be a depot or
|
|
|
|
* an empty list will be returned.
|
|
|
|
* @ingroup AIList
|
|
|
|
*/
|
2010-08-19 17:37:28 +02:00
|
|
|
class AIVehicleList_Depot : public AIList {
|
2009-09-09 11:46:08 +02:00
|
|
|
public:
|
|
|
|
/**
|
|
|
|
* @param tile The tile of the depot to get the list of vehicles from, which have orders to it.
|
|
|
|
*/
|
|
|
|
AIVehicleList_Depot(TileIndex tile);
|
|
|
|
};
|
|
|
|
|
2009-02-05 02:12:49 +01:00
|
|
|
/**
|
|
|
|
* Creates a list of vehicles that share orders.
|
|
|
|
* @ingroup AIList
|
|
|
|
*/
|
2010-08-19 17:37:28 +02:00
|
|
|
class AIVehicleList_SharedOrders : public AIList {
|
2009-02-05 02:12:49 +01:00
|
|
|
public:
|
|
|
|
/**
|
2009-06-03 20:47:08 +02:00
|
|
|
* @param vehicle_id The vehicle that the rest shared orders with.
|
2009-02-05 02:12:49 +01:00
|
|
|
*/
|
|
|
|
AIVehicleList_SharedOrders(VehicleID vehicle_id);
|
|
|
|
};
|
|
|
|
|
2009-03-04 23:37:25 +01:00
|
|
|
/**
|
|
|
|
* Creates a list of vehicles that are in a group.
|
|
|
|
* @ingroup AIList
|
|
|
|
*/
|
2010-08-19 17:37:28 +02:00
|
|
|
class AIVehicleList_Group : public AIList {
|
2009-03-04 23:37:25 +01:00
|
|
|
public:
|
|
|
|
/**
|
|
|
|
* @param group_id The ID of the group the vehicles are in.
|
|
|
|
*/
|
|
|
|
AIVehicleList_Group(GroupID group_id);
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Creates a list of vehicles that are in the default group.
|
|
|
|
* @ingroup AIList
|
|
|
|
*/
|
2010-08-19 17:37:28 +02:00
|
|
|
class AIVehicleList_DefaultGroup : public AIList {
|
2009-03-04 23:37:25 +01:00
|
|
|
public:
|
|
|
|
/**
|
|
|
|
* @param vehicle_type The VehicleType to get the list of vehicles for.
|
|
|
|
*/
|
|
|
|
AIVehicleList_DefaultGroup(AIVehicle::VehicleType vehicle_type);
|
|
|
|
};
|
|
|
|
|
2011-11-30 00:07:38 +01:00
|
|
|
#endif /* SCRIPT_VEHICLELIST_HPP */
|