(svn r28004) -Update from Eints:
[openttd.git] / src / script / api / script_cargolist.hpp
bloba7cd8b69b57452b50312ada7d24b468436a83dde
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_cargolist.hpp List all the cargoes. */
12 #ifndef SCRIPT_CARGOLIST_HPP
13 #define SCRIPT_CARGOLIST_HPP
15 #include "script_list.hpp"
17 /**
18 * Creates a list of cargoes that can be produced in the current game.
19 * @api ai game
20 * @ingroup ScriptList
22 class ScriptCargoList : public ScriptList {
23 public:
24 ScriptCargoList();
27 /**
28 * Creates a list of cargoes that the given industry accepts.
29 * @note This list also includes cargoes that are temporarily not accepted
30 * by this industry, @see ScriptIndustry::IsCargoAccepted.
31 * @api ai game
32 * @ingroup ScriptList
34 class ScriptCargoList_IndustryAccepting : public ScriptList {
35 public:
36 /**
37 * @param industry_id The industry to get the list of cargoes it accepts from.
39 ScriptCargoList_IndustryAccepting(IndustryID industry_id);
42 /**
43 * Creates a list of cargoes that the given industry can produce.
44 * @api ai game
45 * @ingroup ScriptList
47 class ScriptCargoList_IndustryProducing : public ScriptList {
48 public:
49 /**
50 * @param industry_id The industry to get the list of cargoes it produces from.
52 ScriptCargoList_IndustryProducing(IndustryID industry_id);
55 /**
56 * Creates a list of cargoes that the given station accepts.
57 * @api ai game
58 * @ingroup ScriptList
60 class ScriptCargoList_StationAccepting : public ScriptList {
61 public:
62 /**
63 * @param station_id The station to get the list of cargoes it accepts from.
65 ScriptCargoList_StationAccepting(StationID station_id);
68 #endif /* SCRIPT_CARGOLIST_HPP */