Change GetNextStoppingStation to return per-cargo result(s).

This commit is contained in:
Jonathan G Rennison
2016-09-04 12:01:18 +01:00
parent ed99dd2583
commit a670966acf
4 changed files with 123 additions and 37 deletions

View File

@@ -639,9 +639,11 @@ public:
* Get the next station the vehicle will stop at.
* @return ID of the next station the vehicle will stop at or INVALID_STATION.
*/
inline StationIDStack GetNextStoppingStation() const
inline CargoStationIDStackSet GetNextStoppingStation() const
{
return (this->orders.list == NULL) ? INVALID_STATION : this->orders.list->GetNextStoppingStation(this);
CargoStationIDStackSet set;
if (this->orders.list != NULL) set.FillNextStoppingStation(this, this->orders.list);
return set;
}
void ResetRefitCaps();