forked from mirror/OpenTTD
Codechange: put SourceType and SourceID into Source struct
This commit is contained in:
@@ -153,9 +153,10 @@ Town::~Town()
|
||||
}
|
||||
this->psa_list.clear();
|
||||
|
||||
DeleteSubsidyWith(SourceType::Town, this->index);
|
||||
Source src{this->index, SourceType::Town};
|
||||
DeleteSubsidyWith(src);
|
||||
DeleteNewGRFInspectWindow(GSF_FAKE_TOWNS, this->index);
|
||||
CargoPacket::InvalidateAllFrom(SourceType::Town, this->index);
|
||||
CargoPacket::InvalidateAllFrom(src);
|
||||
MarkWholeScreenDirty();
|
||||
}
|
||||
|
||||
@@ -548,7 +549,7 @@ static void TownGenerateCargo(Town *t, CargoType ct, uint amount, StationFinder
|
||||
|
||||
/* Actually generate cargo and update town statistics. */
|
||||
t->supplied[ct].new_max += amount;
|
||||
t->supplied[ct].new_act += MoveGoodsToStation(ct, amount, SourceType::Town, t->index, stations.GetStations());;
|
||||
t->supplied[ct].new_act += MoveGoodsToStation(ct, amount, {t->index, SourceType::Town}, stations.GetStations());;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user