Files
@ r14794:89d059824e59
Branch filter:
Location: cpp/openttd-patchpack/source/src/ai/api/ai_industrytype.hpp - annotation
r14794:89d059824e59
5.5 KiB
text/x-c++hdr
(svn r19394) -Update: base set translations for Afrikaans, Danish, Estonian, Greek, Romanian and Serbian.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 | r10696:8dfe83e30d01 r10696:8dfe83e30d01 r12768:980ae0491352 r12768:980ae0491352 r12768:980ae0491352 r12768:980ae0491352 r12768:980ae0491352 r12768:980ae0491352 r12768:980ae0491352 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10790:a63d33c87344 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r11060:e1df0be366c0 r11060:e1df0be366c0 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r11060:e1df0be366c0 r11060:e1df0be366c0 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r11132:63e74ed3bceb r11132:63e74ed3bceb r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r11069:3f09c162966b r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r11535:0e469c567841 r11535:0e469c567841 r11535:0e469c567841 r11535:0e469c567841 r11535:0e469c567841 r11535:0e469c567841 r11535:0e469c567841 r11535:0e469c567841 r11535:0e469c567841 r11535:0e469c567841 r11535:0e469c567841 r11535:0e469c567841 r11535:0e469c567841 r11535:0e469c567841 r11535:0e469c567841 r11535:0e469c567841 r11535:0e469c567841 r11535:0e469c567841 r11535:0e469c567841 r11535:0e469c567841 r11535:0e469c567841 r11535:0e469c567841 r11535:0e469c567841 r11535:0e469c567841 r10696:8dfe83e30d01 r10696:8dfe83e30d01 r10696:8dfe83e30d01 | /* $Id$ */
/*
* 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/>.
*/
/** @file ai_industrytype.hpp Everything to query and build industries. */
#ifndef AI_INDUSTRYTYPE_HPP
#define AI_INDUSTRYTYPE_HPP
#include "ai_object.hpp"
#include "ai_error.hpp"
#include "ai_list.hpp"
/**
* Class that handles all industry-type related functions.
*/
class AIIndustryType : public AIObject {
public:
static const char *GetClassName() { return "AIIndustryType"; }
/**
* Checks whether the given industry-type is valid.
* @param industry_type The type check.
* @return True if and only if the industry-type is valid.
*/
static bool IsValidIndustryType(IndustryType industry_type);
/**
* Get the name of an industry-type.
* @param industry_type The type to get the name for.
* @pre IsValidIndustryType(industry_type).
* @return The name of an industry.
*/
static char *GetName(IndustryType industry_type);
/**
* Get a list of CargoID possible produced by this industry-type.
* @warning This function only returns the default cargos of the industry type.
* Industries can specify new cargotypes on construction.
* @param industry_type The type to get the CargoIDs for.
* @pre IsValidIndustryType(industry_type).
* @return The CargoIDs of all cargotypes this industry could produce.
*/
static AIList *GetProducedCargo(IndustryType industry_type);
/**
* Get a list of CargoID accepted by this industry-type.
* @warning This function only returns the default cargos of the industry type.
* Industries can specify new cargotypes on construction.
* @param industry_type The type to get the CargoIDs for.
* @pre IsValidIndustryType(industry_type).
* @return The CargoIDs of all cargotypes this industry accepts.
*/
static AIList *GetAcceptedCargo(IndustryType industry_type);
/**
* Is this industry type a raw industry?
* @param industry_type The type of the industry.
* @pre IsValidIndustryType(industry_type).
* @return True if it should be handled as a raw industry.
*/
static bool IsRawIndustry(IndustryType industry_type);
/**
* Can the production of this industry increase?
* @param industry_type The type of the industry.
* @pre IsValidIndustryType(industry_type).
* @return True if the production of this industry can increase.
*/
static bool ProductionCanIncrease(IndustryType industry_type);
/**
* Get the cost for building this industry-type.
* @param industry_type The type of the industry.
* @pre IsValidIndustryType(industry_type).
* @return The cost for building this industry-type.
*/
static Money GetConstructionCost(IndustryType industry_type);
/**
* Can you build this type of industry?
* @param industry_type The type of the industry.
* @pre IsValidIndustryType(industry_type).
* @return True if you can build this type of industry at locations of your choice.
* @note Returns false if you can only prospect this type of industry, or not build it at all.
*/
static bool CanBuildIndustry(IndustryType industry_type);
/**
* Can you prospect this type of industry?
* @param industry_type The type of the industry.
* @pre IsValidIndustryType(industry_type).
* @return True if you can prospect this type of industry.
* @note If the setting "Manual primary industry construction method" is set
* to either "None" or "as other industries" this function always returns false.
*/
static bool CanProspectIndustry(IndustryType industry_type);
/**
* Build an industry of the specified type.
* @param industry_type The type of the industry to build.
* @param tile The tile to build the industry on.
* @pre CanBuildIndustry(industry_type).
* @return True if the industry was succesfully build.
*/
static bool BuildIndustry(IndustryType industry_type, TileIndex tile);
/**
* Prospect an industry of this type. Prospecting an industries let the game try to create
* an industry on a random place on the map.
* @param industry_type The type of the industry.
* @pre CanProspectIndustry(industry_type).
* @return True if no error occured while trying to prospect.
* @note Even if true is returned there is no guarantee a new industry is build.
* @note If true is returned the money is paid, whether a new industry was build or not.
*/
static bool ProspectIndustry(IndustryType industry_type);
/**
* Is this type of industry built on water.
* @param industry_type The type of the industry.
* @pre IsValidIndustryType(industry_type).
* @return True when this type is built on water.
*/
static bool IsBuiltOnWater(IndustryType industry_type);
/**
* Does this type of industry have a heliport?
* @param industry_type The type of the industry.
* @pre IsValidIndustryType(industry_type).
* @return True when this type has a heliport.
*/
static bool HasHeliport(IndustryType industry_type);
/**
* Does this type of industry have a dock?
* @param industry_type The type of the industry.
* @pre IsValidIndustryType(industry_type).
* @return True when this type has a dock.
*/
static bool HasDock(IndustryType industry_type);
};
#endif /* AI_INDUSTRYTYPE_HPP */
|