Change: Decouple and remove landscape-dependent cargo types. (#11719)

Cargo types of default engines, industries and houses are now specified in terms of label.
This commit is contained in:
Peter Nelson
2024-02-04 10:16:08 +00:00
committed by GitHub
parent 83d63464db
commit 2fd9096070
32 changed files with 378 additions and 275 deletions

View File

@@ -78,7 +78,11 @@ struct Town : TownPool::PoolItem<&_town_pool> {
std::string text; ///< General text with additional information.
inline byte GetPercentTransported(CargoID cid) const { return this->supplied[cid].old_act * 256 / (this->supplied[cid].old_max + 1); }
inline byte GetPercentTransported(CargoID cid) const
{
if (!IsValidCargoID(cid)) return 0;
return this->supplied[cid].old_act * 256 / (this->supplied[cid].old_max + 1);
}
StationList stations_near; ///< NOSAVE: List of nearby stations.