|
@@ -109,48 +109,51 @@ struct Industry : PoolItem<Industry, Ind
|
|
|
uint16 produced_cargo_waiting[2]; ///< amount of cargo produced per cargo
|
|
|
uint16 incoming_cargo_waiting[3]; ///< incoming cargo waiting to be processed
|
|
|
byte production_rate[2]; ///< production rate for each cargo
|
|
|
byte prod_level; ///< general production level
|
|
|
CargoID accepts_cargo[3]; ///< 3 input cargo slots
|
|
|
uint16 this_month_production[2]; ///< stats of this month's production per cargo
|
|
|
uint16 this_month_transported[2]; ///< stats of this month's transport per cargo
|
|
|
byte last_month_pct_transported[2]; ///< percentage transported per cargo in the last full month
|
|
|
uint16 last_month_production[2]; ///< total units produced per cargo in the last full month
|
|
|
uint16 last_month_transported[2]; ///< total units transported per cargo in the last full month
|
|
|
uint16 counter; ///< used for animation and/or production (if available cargo)
|
|
|
|
|
|
IndustryType type; ///< type of industry.
|
|
|
OwnerByte owner; ///< owner of the industry. Which SHOULD always be (imho) OWNER_NONE
|
|
|
byte random_color; ///< randomized colour of the industry, for display purpose
|
|
|
Year last_prod_year; ///< last year of production
|
|
|
byte was_cargo_delivered; ///< flag that indicate this has been the closest industry chosen for cargo delivery by a station. see DeliverGoodsToIndustry
|
|
|
|
|
|
OwnerByte founder; ///< Founder of the industry
|
|
|
Date construction_date; ///< Date of the construction of the industry
|
|
|
uint8 construction_type; ///< Way the industry was constructed (@see IndustryConstructionType)
|
|
|
Date last_cargo_accepted_at; ///< Last day cargo was accepted by this industry
|
|
|
byte selected_layout; ///< Which tile layout was used when creating the industry
|
|
|
|
|
|
byte random_triggers; ///< Triggers for the random
|
|
|
uint16 random; ///< Random value used for randomisation of all kinds of things
|
|
|
|
|
|
PersistentStorage psa; ///< Persistent storage for NewGRF industries.
|
|
|
|
|
|
Industry(TileIndex tile = 0) : xy(tile) {}
|
|
|
~Industry();
|
|
|
|
|
|
inline bool IsValid() const { return this->xy != 0; }
|
|
|
};
|
|
|
|
|
|
struct IndustryTileTable {
|
|
|
TileIndexDiffC ti;
|
|
|
IndustryGfx gfx;
|
|
|
};
|
|
|
|
|
|
/** Data related to the handling of grf files. Common to both industry and industry tile */
|
|
|
struct GRFFileProps {
|
|
|
uint16 subst_id;
|
|
|
uint16 local_id; ///< id defined by the grf file for this industry
|
|
|
struct SpriteGroup *spritegroup; ///< pointer to the different sprites of the industry
|
|
|
const struct GRFFile *grffile; ///< grf file that introduced this industry
|
|
|
uint16 override; ///< id of the entity been replaced by
|
|
|
};
|
|
|
|
|
|
/**
|
|
|
* Defines the data structure for constructing industry.
|