mirror of https://github.com/OpenRCT2/OpenRCT2.git
Rename Peep::nausea to Nausea
This commit is contained in:
parent
71dc82e79a
commit
e387539802
|
@ -1476,7 +1476,7 @@ void window_guest_stats_paint(rct_window* w, rct_drawpixelinfo* dpi)
|
|||
y += LIST_ROW_HEIGHT;
|
||||
gfx_draw_string_left(dpi, STR_GUEST_STAT_NAUSEA_LABEL, gCommonFormatArgs, COLOUR_BLACK, x, y);
|
||||
|
||||
int32_t nausea = peep->nausea - 32;
|
||||
int32_t nausea = peep->Nausea - 32;
|
||||
|
||||
if (nausea < 0)
|
||||
nausea = 0;
|
||||
|
|
|
@ -231,7 +231,7 @@ struct GameStateSnapshots final : public IGameStateSnapshots
|
|||
COMPARE_FIELD(Peep, energy_target);
|
||||
COMPARE_FIELD(Peep, happiness);
|
||||
COMPARE_FIELD(Peep, happiness_target);
|
||||
COMPARE_FIELD(Peep, nausea);
|
||||
COMPARE_FIELD(Peep, Nausea);
|
||||
COMPARE_FIELD(Peep, NauseaTarget);
|
||||
COMPARE_FIELD(Peep, Hunger);
|
||||
COMPARE_FIELD(Peep, Thirst);
|
||||
|
|
|
@ -604,7 +604,7 @@ private:
|
|||
peep->Thirst = value;
|
||||
break;
|
||||
case GUEST_PARAMETER_NAUSEA:
|
||||
peep->nausea = value;
|
||||
peep->Nausea = value;
|
||||
peep->NauseaTarget = value;
|
||||
break;
|
||||
case GUEST_PARAMETER_NAUSEA_TOLERANCE:
|
||||
|
|
|
@ -580,7 +580,7 @@ void Guest::HandleEasterEggName()
|
|||
happiness_target = 250;
|
||||
energy = 127;
|
||||
energy_target = 127;
|
||||
nausea = 0;
|
||||
Nausea = 0;
|
||||
NauseaTarget = 0;
|
||||
}
|
||||
|
||||
|
@ -746,8 +746,8 @@ void Guest::Tick128UpdateGuest(int32_t index)
|
|||
if (PeepFlags & PEEP_FLAGS_NAUSEA)
|
||||
{
|
||||
NauseaTarget = 200;
|
||||
if (nausea <= 130)
|
||||
nausea = 130;
|
||||
if (Nausea <= 130)
|
||||
Nausea = 130;
|
||||
}
|
||||
|
||||
if (Angriness != 0)
|
||||
|
@ -911,10 +911,10 @@ void Guest::Tick128UpdateGuest(int32_t index)
|
|||
* remaining times the encompassing conditional is
|
||||
* executed (which is also every second time, but
|
||||
* the alternate time to the true branch). */
|
||||
if (nausea >= 140)
|
||||
if (Nausea >= 140)
|
||||
{
|
||||
PeepThoughtType thought_type = PEEP_THOUGHT_TYPE_SICK;
|
||||
if (nausea >= 200)
|
||||
if (Nausea >= 200)
|
||||
{
|
||||
thought_type = PEEP_THOUGHT_TYPE_VERY_SICK;
|
||||
peep_head_for_nearest_ride_type(this, RIDE_TYPE_FIRST_AID);
|
||||
|
@ -1043,7 +1043,7 @@ void Guest::Tick128UpdateGuest(int32_t index)
|
|||
|
||||
if (state == PEEP_STATE_WALKING && NauseaTarget >= 128)
|
||||
{
|
||||
if ((scenario_rand() & 0xFF) <= static_cast<uint8_t>((nausea - 128) / 2))
|
||||
if ((scenario_rand() & 0xFF) <= static_cast<uint8_t>((Nausea - 128) / 2))
|
||||
{
|
||||
if (Action >= PEEP_ACTION_NONE_1)
|
||||
{
|
||||
|
@ -1165,7 +1165,7 @@ void Guest::Tick128UpdateGuest(int32_t index)
|
|||
WindowInvalidateFlags |= PEEP_INVALIDATE_PEEP_2;
|
||||
}
|
||||
|
||||
uint8_t newNausea = nausea;
|
||||
uint8_t newNausea = Nausea;
|
||||
uint8_t newNauseaGrowth = NauseaTarget;
|
||||
if (newNausea >= newNauseaGrowth)
|
||||
{
|
||||
|
@ -1180,9 +1180,9 @@ void Guest::Tick128UpdateGuest(int32_t index)
|
|||
newNausea = newNauseaGrowth;
|
||||
}
|
||||
|
||||
if (newNausea != nausea)
|
||||
if (newNausea != Nausea)
|
||||
{
|
||||
nausea = newNausea;
|
||||
Nausea = newNausea;
|
||||
WindowInvalidateFlags |= PEEP_INVALIDATE_PEEP_2;
|
||||
}
|
||||
}
|
||||
|
@ -1505,7 +1505,7 @@ bool Guest::DecideAndBuyItem(Ride* ride, int32_t shopItem, money32 price)
|
|||
InsertNewThought(PEEP_THOUGHT_TYPE_HAVENT_FINISHED, bitscanforward(food) + 32);
|
||||
return false;
|
||||
}
|
||||
else if (nausea >= 145)
|
||||
else if (Nausea >= 145)
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1791,7 +1791,7 @@ void Guest::OnExitRide(ride_id_t rideIndex)
|
|||
WindowInvalidateFlags |= PEEP_INVALIDATE_STAFF_STATS;
|
||||
}
|
||||
happiness = happiness_target;
|
||||
nausea = NauseaTarget;
|
||||
Nausea = NauseaTarget;
|
||||
WindowInvalidateFlags |= PEEP_INVALIDATE_PEEP_STATS;
|
||||
|
||||
if (PeepFlags & PEEP_FLAGS_LEAVING_PARK)
|
||||
|
@ -2164,7 +2164,7 @@ bool Guest::ShouldGoOnRide(Ride* ride, int32_t entranceNum, bool atQueue, bool t
|
|||
}
|
||||
|
||||
// Very nauseous peeps will only go on very gentle rides.
|
||||
if (ride->nausea >= FIXED_2DP(1, 40) && nausea > 160)
|
||||
if (ride->nausea >= FIXED_2DP(1, 40) && Nausea > 160)
|
||||
{
|
||||
ChoseNotToGoOnRide(ride, peepAtRide, false);
|
||||
return false;
|
||||
|
@ -2289,7 +2289,7 @@ bool Guest::ShouldGoToShop(Ride* ride, bool peepAtShop)
|
|||
|
||||
if (ride->type == RIDE_TYPE_FIRST_AID)
|
||||
{
|
||||
if (nausea < 128)
|
||||
if (Nausea < 128)
|
||||
{
|
||||
ChoseNotToGoOnRide(ride, peepAtShop, true);
|
||||
return false;
|
||||
|
@ -2876,7 +2876,7 @@ static bool peep_should_go_on_ride_again(Peep* peep, Ride* ride)
|
|||
return false;
|
||||
if (peep->energy < 100)
|
||||
return false;
|
||||
if (peep->nausea > 160)
|
||||
if (peep->Nausea > 160)
|
||||
return false;
|
||||
if (peep->Hunger < 30)
|
||||
return false;
|
||||
|
@ -2911,7 +2911,7 @@ static bool peep_really_liked_ride(Peep* peep, Ride* ride)
|
|||
{
|
||||
if (peep->happiness < 215)
|
||||
return false;
|
||||
if (peep->nausea > 120)
|
||||
if (peep->Nausea > 120)
|
||||
return false;
|
||||
if (!ride_has_ratings(ride))
|
||||
return false;
|
||||
|
@ -5055,7 +5055,7 @@ void Guest::UpdateRideShopInteract()
|
|||
const int16_t tileCenterY = NextLoc.y + 16;
|
||||
if (ride->type == RIDE_TYPE_FIRST_AID)
|
||||
{
|
||||
if (nausea <= 35)
|
||||
if (Nausea <= 35)
|
||||
{
|
||||
sub_state = PEEP_SHOP_LEAVE;
|
||||
|
||||
|
@ -5067,8 +5067,8 @@ void Guest::UpdateRideShopInteract()
|
|||
}
|
||||
else
|
||||
{
|
||||
nausea--;
|
||||
NauseaTarget = nausea;
|
||||
Nausea--;
|
||||
NauseaTarget = Nausea;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -5412,7 +5412,7 @@ void Guest::UpdateWalking()
|
|||
if (PeepFlags & PEEP_FLAGS_LEAVING_PARK)
|
||||
return;
|
||||
|
||||
if (nausea > 140)
|
||||
if (Nausea > 140)
|
||||
return;
|
||||
|
||||
if (happiness < 120)
|
||||
|
@ -6003,7 +6003,7 @@ bool Guest::ShouldFindBench()
|
|||
}
|
||||
}
|
||||
|
||||
if (nausea <= 170 && energy > 50)
|
||||
if (Nausea <= 170 && energy > 50)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -6908,13 +6908,13 @@ void Guest::UpdateSpriteType()
|
|||
return;
|
||||
}
|
||||
|
||||
if (nausea > 170)
|
||||
if (Nausea > 170)
|
||||
{
|
||||
SetSpriteType(PEEP_SPRITE_TYPE_VERY_NAUSEOUS);
|
||||
return;
|
||||
}
|
||||
|
||||
if (nausea > 140)
|
||||
if (Nausea > 140)
|
||||
{
|
||||
SetSpriteType(PEEP_SPRITE_TYPE_NAUSEOUS);
|
||||
return;
|
||||
|
|
|
@ -655,10 +655,10 @@ std::optional<CoordsXY> Peep::UpdateAction(int16_t& xy_distance)
|
|||
Hunger /= 2;
|
||||
NauseaTarget /= 2;
|
||||
|
||||
if (nausea < 30)
|
||||
nausea = 0;
|
||||
if (Nausea < 30)
|
||||
Nausea = 0;
|
||||
else
|
||||
nausea -= 30;
|
||||
Nausea -= 30;
|
||||
|
||||
WindowInvalidateFlags |= PEEP_INVALIDATE_PEEP_2;
|
||||
|
||||
|
@ -1692,7 +1692,7 @@ Peep* Peep::Generate(const CoordsXYZ& coords)
|
|||
/* Adjust by the delta, clamping at min=0 and max=255. */
|
||||
peep->happiness = std::clamp(peep->happiness + happinessDelta, 0, PEEP_MAX_HAPPINESS);
|
||||
peep->happiness_target = peep->happiness;
|
||||
peep->nausea = 0;
|
||||
peep->Nausea = 0;
|
||||
peep->NauseaTarget = 0;
|
||||
|
||||
/* Scenario editor limits initial guest hunger to between 37..253.
|
||||
|
@ -2166,15 +2166,15 @@ static int32_t get_face_sprite_offset(Peep* peep)
|
|||
return PEEP_FACE_OFFSET_ANGRY;
|
||||
|
||||
// VERY_VERY_SICK
|
||||
if (peep->nausea > 200)
|
||||
if (peep->Nausea > 200)
|
||||
return PEEP_FACE_OFFSET_VERY_VERY_SICK;
|
||||
|
||||
// VERY_SICK
|
||||
if (peep->nausea > 170)
|
||||
if (peep->Nausea > 170)
|
||||
return PEEP_FACE_OFFSET_VERY_SICK;
|
||||
|
||||
// SICK
|
||||
if (peep->nausea > 140)
|
||||
if (peep->Nausea > 140)
|
||||
return PEEP_FACE_OFFSET_SICK;
|
||||
|
||||
// VERY_TIRED
|
||||
|
|
|
@ -619,7 +619,7 @@ struct Peep : SpriteBase
|
|||
uint8_t energy_target;
|
||||
uint8_t happiness;
|
||||
uint8_t happiness_target;
|
||||
uint8_t nausea;
|
||||
uint8_t Nausea;
|
||||
uint8_t NauseaTarget;
|
||||
uint8_t Hunger;
|
||||
uint8_t Thirst;
|
||||
|
|
|
@ -1452,7 +1452,7 @@ private:
|
|||
dst->energy_target = src->energy_target;
|
||||
dst->happiness = src->happiness;
|
||||
dst->happiness_target = src->happiness_target;
|
||||
dst->nausea = src->nausea;
|
||||
dst->Nausea = src->nausea;
|
||||
dst->NauseaTarget = src->nausea_target;
|
||||
dst->Hunger = src->hunger;
|
||||
dst->Thirst = src->thirst;
|
||||
|
|
|
@ -1153,7 +1153,7 @@ void S6Exporter::ExportSpritePeep(RCT2SpritePeep* dst, const Peep* src)
|
|||
dst->energy_target = src->energy_target;
|
||||
dst->happiness = src->happiness;
|
||||
dst->happiness_target = src->happiness_target;
|
||||
dst->nausea = src->nausea;
|
||||
dst->nausea = src->Nausea;
|
||||
dst->nausea_target = src->NauseaTarget;
|
||||
dst->hunger = src->Hunger;
|
||||
dst->thirst = src->Thirst;
|
||||
|
|
|
@ -1418,7 +1418,7 @@ public:
|
|||
dst->energy_target = src->energy_target;
|
||||
dst->happiness = src->happiness;
|
||||
dst->happiness_target = src->happiness_target;
|
||||
dst->nausea = src->nausea;
|
||||
dst->Nausea = src->nausea;
|
||||
dst->NauseaTarget = src->nausea_target;
|
||||
dst->Hunger = src->hunger;
|
||||
dst->Thirst = src->thirst;
|
||||
|
|
|
@ -491,7 +491,7 @@ namespace OpenRCT2::Scripting
|
|||
uint8_t nausea_get() const
|
||||
{
|
||||
auto peep = GetPeep();
|
||||
return peep != nullptr ? peep->nausea : 0;
|
||||
return peep != nullptr ? peep->Nausea : 0;
|
||||
}
|
||||
void nausea_set(uint8_t value)
|
||||
{
|
||||
|
@ -499,7 +499,7 @@ namespace OpenRCT2::Scripting
|
|||
auto peep = GetPeep();
|
||||
if (peep != nullptr)
|
||||
{
|
||||
peep->nausea = value;
|
||||
peep->Nausea = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -175,7 +175,7 @@ static void CompareSpriteDataPeep(const Peep& left, const Peep& right)
|
|||
COMPARE_FIELD(energy_target);
|
||||
COMPARE_FIELD(happiness);
|
||||
COMPARE_FIELD(happiness_target);
|
||||
COMPARE_FIELD(nausea);
|
||||
COMPARE_FIELD(Nausea);
|
||||
COMPARE_FIELD(NauseaTarget);
|
||||
COMPARE_FIELD(Hunger);
|
||||
COMPARE_FIELD(Thirst);
|
||||
|
|
Loading…
Reference in New Issue