* Update the cached animation trigger bitmask for a station. * @param st Station to update. */
| 1023 | * @param st Station to update. |
| 1024 | */ |
| 1025 | void StationUpdateCachedTriggers(BaseStation *st) |
| 1026 | { |
| 1027 | st->cached_anim_triggers = {}; |
| 1028 | st->cached_cargo_triggers = 0; |
| 1029 | |
| 1030 | /* Combine animation trigger bitmask for all station specs |
| 1031 | * of this station. */ |
| 1032 | for (const auto &sm : GetStationSpecList<StationSpec>(st)) { |
| 1033 | if (sm.spec == nullptr) continue; |
| 1034 | st->cached_anim_triggers.Set(sm.spec->animation.triggers); |
| 1035 | st->cached_cargo_triggers |= sm.spec->cargo_triggers; |
| 1036 | } |
| 1037 | } |
| 1038 |
no test coverage detected