* Get a mask of the cargo types that the station accepts. * @param st Station to query * @return the expected mask */
| 487 | * @return the expected mask |
| 488 | */ |
| 489 | CargoTypes GetAcceptanceMask(const Station *st) |
| 490 | { |
| 491 | CargoTypes mask = 0; |
| 492 | |
| 493 | for (auto it = std::begin(st->goods); it != std::end(st->goods); ++it) { |
| 494 | if (it->status.Test(GoodsEntry::State::Acceptance)) SetBit(mask, std::distance(std::begin(st->goods), it)); |
| 495 | } |
| 496 | return mask; |
| 497 | } |
| 498 | |
| 499 | /** |
| 500 | * Get a mask of the cargo types that are empty at the station. |
no test coverage detected