Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00012 #ifndef SCRIPT_INDUSTRY_HPP
00013 #define SCRIPT_INDUSTRY_HPP
00014
00015 #include "script_object.hpp"
00016
00021 class ScriptIndustry : public ScriptObject {
00022 public:
00024 enum CargoAcceptState {
00025 CAS_NOT_ACCEPTED,
00026 CAS_ACCEPTED,
00027 CAS_TEMP_REFUSED,
00028 };
00029
00035 static int32 GetIndustryCount();
00036
00042 static bool IsValidIndustry(IndustryID industry_id);
00043
00052 static IndustryID GetIndustryID(TileIndex tile);
00053
00060 static char *GetName(IndustryID industry_id);
00061
00070 static CargoAcceptState IsCargoAccepted(IndustryID industry_id, CargoID cargo_id);
00071
00080 static int32 GetStockpiledCargo(IndustryID industry_id, CargoID cargo_id);
00081
00090 static int32 GetLastMonthProduction(IndustryID industry_id, CargoID cargo_id);
00091
00100 static int32 GetLastMonthTransported(IndustryID industry_id, CargoID cargo_id);
00101
00110 static int32 GetLastMonthTransportedPercentage(IndustryID industry_id, CargoID cargo_id);
00111
00118 static TileIndex GetLocation(IndustryID industry_id);
00119
00128 static int32 GetAmountOfStationsAround(IndustryID industry_id);
00129
00139 static int32 GetDistanceManhattanToTile(IndustryID industry_id, TileIndex tile);
00140
00150 static int32 GetDistanceSquareToTile(IndustryID industry_id, TileIndex tile);
00151
00158 static bool IsBuiltOnWater(IndustryID industry_id);
00159
00166 static bool HasHeliport(IndustryID industry_id);
00167
00175 static TileIndex GetHeliportLocation(IndustryID industry_id);
00176
00183 static bool HasDock(IndustryID industry_id);
00184
00192 static TileIndex GetDockLocation(IndustryID industry_id);
00193
00200 static IndustryType GetIndustryType(IndustryID industry_id);
00201 };
00202
00203 #endif