Enable allowing/disallowing supply to a station, per cargo

Ctrl-click station cargo rating
This commit is contained in:
Jonathan G Rennison
2020-03-22 13:49:22 +00:00
parent 568dec5b57
commit ba65a79d09
8 changed files with 75 additions and 4 deletions

View File

@@ -521,6 +521,11 @@ struct GoodsEntry {
* This flag is reset every STATION_ACCEPTANCE_TICKS ticks.
*/
GES_ACCEPTED_BIGTICK,
/**
* Set when cargo is not permitted to be supplied by nearby industries/houses.
*/
GES_NO_CARGO_SUPPLY = 7,
};
GoodsEntry() :
@@ -574,6 +579,11 @@ struct GoodsEntry {
FlowStatMap flows; ///< Planned flows through this station.
uint max_waiting_cargo; ///< Max cargo from this station waiting at any station.
bool IsSupplyAllowed() const
{
return !HasBit(this->status, GES_NO_CARGO_SUPPLY);
}
/**
* Reports whether a vehicle has ever tried to load the cargo at this station.
* This does not imply that there was cargo available for loading. Refer to GES_RATING for that.