* Run the watched cargo callback for all houses in the catchment area. * @param st Station. */
| 3890 | * @param st Station. |
| 3891 | */ |
| 3892 | void TriggerWatchedCargoCallbacks(Station *st) |
| 3893 | { |
| 3894 | /* Collect cargoes accepted since the last big tick. */ |
| 3895 | CargoTypes cargoes = 0; |
| 3896 | for (CargoType cargo_type = 0; cargo_type < NUM_CARGO; cargo_type++) { |
| 3897 | if (st->goods[cargo_type].status.Test(GoodsEntry::State::AcceptedBigtick)) SetBit(cargoes, cargo_type); |
| 3898 | } |
| 3899 | |
| 3900 | /* Anything to do? */ |
| 3901 | if (cargoes == 0) return; |
| 3902 | |
| 3903 | /* Loop over all houses in the catchment. */ |
| 3904 | BitmapTileIterator it(st->catchment_tiles); |
| 3905 | for (TileIndex tile = it; tile != INVALID_TILE; tile = ++it) { |
| 3906 | if (IsTileType(tile, MP_HOUSE)) { |
| 3907 | TriggerHouseAnimation_WatchedCargoAccepted(tile, cargoes); |
| 3908 | } |
| 3909 | } |
| 3910 | } |
| 3911 | |
| 3912 | /** |
| 3913 | * This function is called for each station once every 250 ticks. |
no test coverage detected