| 34 | }; |
| 35 | |
| 36 | void formatObjective(Formatter& ft, const Scenario::Objective& objective) |
| 37 | { |
| 38 | if (objective.Type == Scenario::ObjectiveType::buildTheBest) |
| 39 | { |
| 40 | StringId rideTypeString = kStringIdNone; |
| 41 | auto rideTypeId = objective.RideId; |
| 42 | if (rideTypeId != kRideTypeNull && rideTypeId < RIDE_TYPE_COUNT) |
| 43 | { |
| 44 | rideTypeString = GetRideTypeDescriptor(rideTypeId).Naming.Name; |
| 45 | } |
| 46 | ft.Add<StringId>(rideTypeString); |
| 47 | } |
| 48 | else if (objective.Type == Scenario::ObjectiveType::guestsBy) |
| 49 | { |
| 50 | ft.Add<int32_t>(objective.NumGuests); |
| 51 | ft.Add<int16_t>(DateGetTotalMonths(MONTH_OCTOBER, objective.Year)); |
| 52 | } |
| 53 | else if (objective.Type == Scenario::ObjectiveType::guestsAndRating) |
| 54 | { |
| 55 | ft.Add<int32_t>(objective.NumGuests); |
| 56 | } |
| 57 | else if (objective.Type == Scenario::ObjectiveType::tenRollercoastersLength) |
| 58 | { |
| 59 | ft.Add<int16_t>(objective.MinimumLength); |
| 60 | } |
| 61 | else |
| 62 | { |
| 63 | ft.Add<int16_t>(objective.NumGuests); |
| 64 | ft.Add<int16_t>(DateGetTotalMonths(MONTH_OCTOBER, objective.Year)); |
| 65 | if (objective.Type == Scenario::ObjectiveType::finishFiveRollercoasters) |
| 66 | ft.Add<RideRating_t>(objective.MinimumExcitement); |
| 67 | else |
| 68 | ft.Add<money64>(objective.Currency); |
| 69 | } |
| 70 | } |
| 71 | } // namespace OpenRCT2::Ui |
no test coverage detected