* Determines the first cargo with a certain town effect * @param effect Town effect of interest * @return first active cargo slot with that effect */
| 3125 | * @return first active cargo slot with that effect |
| 3126 | */ |
| 3127 | const CargoSpec *FindFirstCargoWithTownAcceptanceEffect(TownAcceptanceEffect effect) |
| 3128 | { |
| 3129 | for (const CargoSpec *cs : CargoSpec::Iterate()) { |
| 3130 | if (cs->town_acceptance_effect == effect) return cs; |
| 3131 | } |
| 3132 | return nullptr; |
| 3133 | } |
| 3134 | |
| 3135 | /** |
| 3136 | * Change the cargo goal of a town. |
no outgoing calls
no test coverage detected