OpenTTD
|
Base of all industries. More...
#include "newgrf_storage.h"
#include "subsidy_type.h"
#include "industry_map.h"
#include "tilearea_type.h"
Go to the source code of this file.
Data Structures | |
struct | Industry |
Defines the internal data of a functional industry. More... | |
struct | IndustryTypeBuildData |
Data for managing the number of industries of a single industry type. More... | |
struct | IndustryBuildData |
Data for managing the number and type of industries in the game. More... |
Macros | |
#define | FOR_ALL_INDUSTRIES_FROM(var, start) FOR_ALL_ITEMS_FROM(Industry, industry_index, var, start) |
#define | FOR_ALL_INDUSTRIES(var) FOR_ALL_INDUSTRIES_FROM(var, 0) |
Typedefs | |
typedef Pool< Industry, IndustryID, 64, 64000 > | IndustryPool |
Enumerations | |
enum | ProductionLevels { PRODLEVEL_CLOSURE = 0x00, PRODLEVEL_MINIMUM = 0x04, PRODLEVEL_DEFAULT = 0x10, PRODLEVEL_MAXIMUM = 0x80 } |
Production level maximum, minimum and default values. More... |
Functions | |
void | PlantRandomFarmField (const Industry *i) |
void | ReleaseDisastersTargetingIndustry (IndustryID) |
Marks all disasters targeting this industry in such a way they won't call Industry::Get(v->dest_tile) on invalid industry anymore. | |
bool | IsTileForestIndustry (TileIndex tile) |
Check whether the tile is a forest. |
Variables | |
IndustryPool | _industry_pool |
IndustryBuildData | _industry_builder |
In-game manager of industries. |
Base of all industries.
Definition in file industry.h.
enum ProductionLevels |
Production level maximum, minimum and default values.
It is not a value been really used in order to change, but rather an indicator of how the industry is behaving.
Definition at line 29 of file industry.h.
bool IsTileForestIndustry | ( | TileIndex | tile | ) |
Check whether the tile is a forest.
tile | the tile to investigate. |
Definition at line 925 of file industry_cmd.cpp.
References CT_INVALID, CargoSpec::Get(), Industry::GetByTile(), GetIndustrySpec(), INDUSTRYLIFE_ORGANIC, IsTileType(), CargoSpec::label, lengthof, IndustrySpec::life_type, MP_INDUSTRY, Industry::produced_cargo, and Industry::type.
Referenced by GetSmallMapVegetationPixels().
void ReleaseDisastersTargetingIndustry | ( | IndustryID | i | ) |
Marks all disasters targeting this industry in such a way they won't call Industry::Get(v->dest_tile) on invalid industry anymore.
i | deleted industry |
Definition at line 943 of file disaster_vehicle.cpp.
References Vehicle::current_order, Vehicle::dest_tile, FOR_ALL_DISASTERVEHICLES, Order::GetDestination(), Order::SetDestination(), ST_AIRPLANE, ST_HELICOPTER, and Vehicle::subtype.