| 176 | |
| 177 | template <ScriptStationList_Cargo::CargoSelector Tselector> |
| 178 | void ScriptStationList_CargoWaiting::Add(StationID station_id, CargoType cargo, StationID other_station) |
| 179 | { |
| 180 | CargoCollector collector(this, station_id, cargo, other_station); |
| 181 | if (collector.GE() == nullptr) return; |
| 182 | if (!collector.GE()->HasData()) return; |
| 183 | |
| 184 | StationCargoList::ConstIterator iter = collector.GE()->GetData().cargo.Packets()->begin(); |
| 185 | StationCargoList::ConstIterator end = collector.GE()->GetData().cargo.Packets()->end(); |
| 186 | for (; iter != end; ++iter) { |
| 187 | collector.Update<Tselector>((*iter)->GetFirstStation(), iter.GetKey(), (*iter)->Count()); |
| 188 | } |
| 189 | } |
| 190 | |
| 191 | |
| 192 | template <ScriptStationList_Cargo::CargoSelector Tselector> |