* Fix 2fd90960: Missing default vehicles and industry acceptance/production.
Some default definitions are used across multiple climate types and relied on climate-independent cargo slot even though they specified a climate-dependent cargo type.
Add MixedCargoType that indirectly allows multiple labels to be specified for these.
This commit is contained in:
@@ -110,7 +110,7 @@ struct IndustrySpec {
|
||||
IndustryType conflicting[3]; ///< Industries this industry cannot be close to
|
||||
byte check_proc; ///< Index to a procedure to check for conflicting circumstances
|
||||
CargoID produced_cargo[INDUSTRY_NUM_OUTPUTS];
|
||||
CargoLabel produced_cargo_label[INDUSTRY_NUM_OUTPUTS];
|
||||
std::variant<CargoLabel, MixedCargoType> produced_cargo_label[INDUSTRY_NUM_OUTPUTS];
|
||||
byte production_rate[INDUSTRY_NUM_OUTPUTS];
|
||||
/**
|
||||
* minimum amount of cargo transported to the stations.
|
||||
@@ -118,7 +118,7 @@ struct IndustrySpec {
|
||||
*/
|
||||
byte minimal_cargo;
|
||||
CargoID accepts_cargo[INDUSTRY_NUM_INPUTS]; ///< 16 accepted cargoes.
|
||||
CargoLabel accepts_cargo_label[INDUSTRY_NUM_INPUTS];
|
||||
std::variant<CargoLabel, MixedCargoType> accepts_cargo_label[INDUSTRY_NUM_INPUTS];
|
||||
uint16_t input_cargo_multiplier[INDUSTRY_NUM_INPUTS][INDUSTRY_NUM_OUTPUTS]; ///< Input cargo multipliers (multiply amount of incoming cargo for the produced cargoes)
|
||||
IndustryLifeType life_type; ///< This is also known as Industry production flag, in newgrf specs
|
||||
byte climate_availability; ///< Bitmask, giving landscape enums as bit position
|
||||
@@ -155,7 +155,7 @@ struct IndustrySpec {
|
||||
*/
|
||||
struct IndustryTileSpec {
|
||||
std::array<CargoID, INDUSTRY_NUM_INPUTS> accepts_cargo; ///< Cargo accepted by this tile
|
||||
std::array<CargoLabel, INDUSTRY_NUM_INPUTS> accepts_cargo_label;
|
||||
std::array<std::variant<CargoLabel, MixedCargoType>, INDUSTRY_NUM_INPUTS> accepts_cargo_label;
|
||||
std::array<int8_t, INDUSTRY_NUM_INPUTS> acceptance; ///< Level of acceptance per cargo type (signed, may be negative!)
|
||||
Slope slopes_refused; ///< slope pattern on which this tile cannot be built
|
||||
byte anim_production; ///< Animation frame to start when goods are produced
|
||||
|
||||
Reference in New Issue
Block a user