OpenTTD Source
1.11.0-beta2
|
#include "newgrf_storage.h"
#include "subsidy_type.h"
#include "industry_map.h"
#include "industrytype.h"
#include "tilearea_type.h"
#include "station_base.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... | |
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... | |
enum | IndustryAction : byte { IndustryAction::SetControlFlags = 0, IndustryAction::SetExclusiveSupplier = 1, IndustryAction::SetExclusiveConsumer = 2, IndustryAction::SetText = 3 } |
enum | IndustryControlFlags : byte { INDCTL_NONE = 0, INDCTL_NO_PRODUCTION_DECREASE = 1 << 0, INDCTL_NO_PRODUCTION_INCREASE = 1 << 1, INDCTL_NO_CLOSURE = 1 << 2, INDCTL_MASK = INDCTL_NO_PRODUCTION_DECREASE | INDCTL_NO_PRODUCTION_INCREASE | INDCTL_NO_CLOSURE } |
Flags to control/override the behaviour of an industry. More... | |
enum | IndustryDirectoryInvalidateWindowData { IDIWD_FORCE_REBUILD, IDIWD_PRODUCTION_CHANGE, IDIWD_FORCE_RESORT } |
Special values for the industry list window for the data parameter of InvalidateWindowData. | |
Functions | |
DECLARE_ENUM_AS_BIT_SET (IndustryControlFlags) | |
void | ClearAllIndustryCachedNames () |
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. More... | |
bool | IsTileForestIndustry (TileIndex tile) |
Check whether the tile is a forest. More... | |
Variables | |
IndustryPool | _industry_pool |
IndustryBuildData | _industry_builder |
In-game manager of industries. | |
Base of all industries.
Definition in file industry.h.
|
strong |
Enumerator | |
---|---|
SetControlFlags | Set IndustryControlFlags. |
SetExclusiveSupplier | Set exclusive supplier. |
SetExclusiveConsumer | Set exclusive consumer. |
SetText | Set additional text. |
Definition at line 36 of file industry.h.
enum IndustryControlFlags : byte |
Flags to control/override the behaviour of an industry.
These flags are controlled by game scripts.
Enumerator | |
---|---|
INDCTL_NONE | No flags in effect. |
INDCTL_NO_PRODUCTION_DECREASE | When industry production change is evaluated, rolls to decrease are ignored. |
INDCTL_NO_PRODUCTION_INCREASE | When industry production change is evaluated, rolls to increase are ignored. |
INDCTL_NO_CLOSURE | Industry can not close regardless of production level or time since last delivery. This does not prevent a closure already announced. |
INDCTL_MASK | Mask of all flags set. |
Definition at line 47 of 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 962 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.
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 938 of file disaster_vehicle.cpp.
References Vehicle::current_order, Vehicle::dest_tile, Order::GetDestination(), SpecializedVehicle< DisasterVehicle, VEH_DISASTER >::Iterate(), Order::SetDestination(), ST_AIRPLANE, ST_HELICOPTER, and Vehicle::subtype.