mirror of https://github.com/OpenRCT2/OpenRCT2.git
Rename Peep::nausea_tolerance to use TitleCase
This commit is contained in:
parent
f732c2f1cd
commit
f1337768f5
|
@ -1557,7 +1557,7 @@ void window_guest_stats_paint(rct_window* w, rct_drawpixelinfo* dpi)
|
|||
STR_PEEP_STAT_NAUSEA_TOLERANCE_HIGH,
|
||||
};
|
||||
y += LIST_ROW_HEIGHT;
|
||||
int32_t nausea_tolerance = peep->nausea_tolerance & 0x3;
|
||||
int32_t nausea_tolerance = peep->NauseaTolerance & 0x3;
|
||||
ft = Formatter::Common();
|
||||
ft.Add<rct_string_id>(nauseaTolerances[nausea_tolerance]);
|
||||
gfx_draw_string_left(dpi, STR_GUEST_STAT_NAUSEA_TOLERANCE, gCommonFormatArgs, COLOUR_BLACK, x, y);
|
||||
|
|
|
@ -239,7 +239,7 @@ struct GameStateSnapshots final : public IGameStateSnapshots
|
|||
COMPARE_FIELD(Peep, mass);
|
||||
COMPARE_FIELD(Peep, time_to_consume);
|
||||
COMPARE_FIELD(Peep, intensity);
|
||||
COMPARE_FIELD(Peep, nausea_tolerance);
|
||||
COMPARE_FIELD(Peep, NauseaTolerance);
|
||||
COMPARE_FIELD(Peep, WindowInvalidateFlags);
|
||||
COMPARE_FIELD(Peep, PaidOnDrink);
|
||||
for (int i = 0; i < 16; i++)
|
||||
|
|
|
@ -608,7 +608,7 @@ private:
|
|||
peep->nausea_target = value;
|
||||
break;
|
||||
case GUEST_PARAMETER_NAUSEA_TOLERANCE:
|
||||
peep->nausea_tolerance = value;
|
||||
peep->NauseaTolerance = value;
|
||||
break;
|
||||
case GUEST_PARAMETER_TOILET:
|
||||
peep->toilet = value;
|
||||
|
|
|
@ -2146,7 +2146,7 @@ bool Guest::ShouldGoOnRide(Ride* ride, int32_t entranceNum, bool atQueue, bool t
|
|||
}
|
||||
|
||||
// Nausea calculations.
|
||||
ride_rating maxNausea = NauseaMaximumThresholds[(nausea_tolerance & 3)] + happiness;
|
||||
ride_rating maxNausea = NauseaMaximumThresholds[(NauseaTolerance & 3)] + happiness;
|
||||
|
||||
if (ride->nausea > maxNausea)
|
||||
{
|
||||
|
@ -2785,8 +2785,8 @@ static int16_t peep_calculate_ride_intensity_nausea_satisfaction(Peep* peep, Rid
|
|||
|
||||
// Although it's not shown in the interface, a peep with Average or High nausea tolerance
|
||||
// has a minimum preferred nausea value. (For peeps with None or Low, this is set to zero.)
|
||||
ride_rating minNausea = NauseaMinimumThresholds[(peep->nausea_tolerance & 3)];
|
||||
ride_rating maxNausea = NauseaMaximumThresholds[(peep->nausea_tolerance & 3)];
|
||||
ride_rating minNausea = NauseaMinimumThresholds[(peep->NauseaTolerance & 3)];
|
||||
ride_rating maxNausea = NauseaMaximumThresholds[(peep->NauseaTolerance & 3)];
|
||||
if (minNausea <= ride->nausea && maxNausea >= ride->nausea)
|
||||
{
|
||||
nauseaSatisfaction--;
|
||||
|
@ -2860,7 +2860,7 @@ static void peep_update_ride_nausea_growth(Peep* peep, Ride* ride)
|
|||
uint32_t nauseaMultiplier = std::clamp(256 - peep->happiness_target, 64, 200);
|
||||
uint32_t nauseaGrowthRateChange = (ride->nausea * nauseaMultiplier) / 512;
|
||||
nauseaGrowthRateChange *= std::max(static_cast<uint8_t>(128), peep->hunger) / 64;
|
||||
nauseaGrowthRateChange >>= (peep->nausea_tolerance & 3);
|
||||
nauseaGrowthRateChange >>= (peep->NauseaTolerance & 3);
|
||||
peep->nausea_target = static_cast<uint8_t>(std::min(peep->nausea_target + nauseaGrowthRateChange, 255u));
|
||||
}
|
||||
|
||||
|
|
|
@ -1677,7 +1677,7 @@ Peep* Peep::Generate(const CoordsXYZ& coords)
|
|||
nauseaTolerance += 4;
|
||||
}
|
||||
|
||||
peep->nausea_tolerance = nausea_tolerance_distribution[nauseaTolerance];
|
||||
peep->NauseaTolerance = nausea_tolerance_distribution[nauseaTolerance];
|
||||
|
||||
/* Scenario editor limits initial guest happiness to between 37..253.
|
||||
* To be on the safe side, assume the value could have been hacked
|
||||
|
|
|
@ -627,7 +627,7 @@ struct Peep : SpriteBase
|
|||
uint8_t mass;
|
||||
uint8_t time_to_consume;
|
||||
IntensityRange intensity;
|
||||
uint8_t nausea_tolerance;
|
||||
uint8_t NauseaTolerance;
|
||||
uint8_t WindowInvalidateFlags;
|
||||
money16 PaidOnDrink;
|
||||
uint8_t RideTypesBeenOn[16];
|
||||
|
|
|
@ -1463,7 +1463,7 @@ private:
|
|||
dst->DisgustingCount = src->disgusting_count;
|
||||
|
||||
dst->intensity = static_cast<IntensityRange>(src->intensity);
|
||||
dst->nausea_tolerance = src->nausea_tolerance;
|
||||
dst->NauseaTolerance = src->nausea_tolerance;
|
||||
dst->WindowInvalidateFlags = 0;
|
||||
|
||||
dst->CurrentRide = src->current_ride;
|
||||
|
|
|
@ -1161,7 +1161,7 @@ void S6Exporter::ExportSpritePeep(RCT2SpritePeep* dst, const Peep* src)
|
|||
dst->mass = src->mass;
|
||||
dst->time_to_consume = src->time_to_consume;
|
||||
dst->intensity = static_cast<uint8_t>(src->intensity);
|
||||
dst->nausea_tolerance = src->nausea_tolerance;
|
||||
dst->nausea_tolerance = src->NauseaTolerance;
|
||||
dst->window_invalidate_flags = src->WindowInvalidateFlags;
|
||||
dst->paid_on_drink = src->PaidOnDrink;
|
||||
for (size_t i = 0; i < std::size(src->RideTypesBeenOn); i++)
|
||||
|
|
|
@ -1426,7 +1426,7 @@ public:
|
|||
dst->mass = src->mass;
|
||||
dst->time_to_consume = src->time_to_consume;
|
||||
dst->intensity = static_cast<IntensityRange>(src->intensity);
|
||||
dst->nausea_tolerance = src->nausea_tolerance;
|
||||
dst->NauseaTolerance = src->nausea_tolerance;
|
||||
dst->WindowInvalidateFlags = src->window_invalidate_flags;
|
||||
dst->PaidOnDrink = src->paid_on_drink;
|
||||
for (size_t i = 0; i < std::size(src->ride_types_been_on); i++)
|
||||
|
|
|
@ -611,7 +611,7 @@ namespace OpenRCT2::Scripting
|
|||
uint8_t nauseaTolerance_get() const
|
||||
{
|
||||
auto peep = GetPeep();
|
||||
return peep != nullptr ? peep->nausea_tolerance : 0;
|
||||
return peep != nullptr ? peep->NauseaTolerance : 0;
|
||||
}
|
||||
void nauseaTolerance_set(uint8_t value)
|
||||
{
|
||||
|
@ -619,7 +619,7 @@ namespace OpenRCT2::Scripting
|
|||
auto peep = GetPeep();
|
||||
if (peep != nullptr)
|
||||
{
|
||||
peep->nausea_tolerance = std::min<uint8_t>(value, 3);
|
||||
peep->NauseaTolerance = std::min<uint8_t>(value, 3);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -183,7 +183,7 @@ static void CompareSpriteDataPeep(const Peep& left, const Peep& right)
|
|||
COMPARE_FIELD(mass);
|
||||
COMPARE_FIELD(time_to_consume);
|
||||
COMPARE_FIELD(intensity);
|
||||
COMPARE_FIELD(nausea_tolerance);
|
||||
COMPARE_FIELD(NauseaTolerance);
|
||||
COMPARE_FIELD(WindowInvalidateFlags);
|
||||
COMPARE_FIELD(PaidOnDrink);
|
||||
for (int i = 0; i < PEEP_MAX_THOUGHTS; i++)
|
||||
|
|
Loading…
Reference in New Issue