/***************************************************************************** * Copyright (c) 2014-2024 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 * * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ #include "Objective.h" #include #include #include #include #include #include void formatObjective(Formatter& ft, Objective objective) { if (objective.Type == OBJECTIVE_BUILD_THE_BEST) { StringId rideTypeString = STR_NONE; auto rideTypeId = objective.RideId; if (rideTypeId != RIDE_TYPE_NULL && rideTypeId < RIDE_TYPE_COUNT) { rideTypeString = GetRideTypeDescriptor(rideTypeId).Naming.Name; } ft.Add(rideTypeString); } else if (objective.Type == OBJECTIVE_GUESTS_BY) { ft.Add(objective.NumGuests); ft.Add(DateGetTotalMonths(MONTH_OCTOBER, objective.Year)); } else if (objective.Type == OBJECTIVE_GUESTS_AND_RATING) { ft.Add(objective.NumGuests); } else if (objective.Type == OBJECTIVE_10_ROLLERCOASTERS_LENGTH) { ft.Add(objective.MinimumLength); } else { ft.Add(objective.NumGuests); ft.Add(DateGetTotalMonths(MONTH_OCTOBER, objective.Year)); if (objective.Type == OBJECTIVE_FINISH_5_ROLLERCOASTERS) ft.Add(objective.MinimumExcitement); else ft.Add(objective.Currency); } }