mirror of https://github.com/OpenRCT2/OpenRCT2.git
Rename Peep::toilet to Toilet
This commit is contained in:
parent
05cc016132
commit
3dd4adeb81
|
@ -1494,7 +1494,7 @@ void window_guest_stats_paint(rct_window* w, rct_drawpixelinfo* dpi)
|
|||
y += LIST_ROW_HEIGHT;
|
||||
gfx_draw_string_left(dpi, STR_GUEST_STAT_TOILET_LABEL, gCommonFormatArgs, COLOUR_BLACK, x, y);
|
||||
|
||||
int32_t toilet = peep->toilet - 32;
|
||||
int32_t toilet = peep->Toilet - 32;
|
||||
if (toilet > 210)
|
||||
toilet = 210;
|
||||
|
||||
|
|
|
@ -235,7 +235,7 @@ struct GameStateSnapshots final : public IGameStateSnapshots
|
|||
COMPARE_FIELD(Peep, nausea_target);
|
||||
COMPARE_FIELD(Peep, hunger);
|
||||
COMPARE_FIELD(Peep, thirst);
|
||||
COMPARE_FIELD(Peep, toilet);
|
||||
COMPARE_FIELD(Peep, Toilet);
|
||||
COMPARE_FIELD(Peep, Mass);
|
||||
COMPARE_FIELD(Peep, TimeToConsume);
|
||||
COMPARE_FIELD(Peep, Intensity);
|
||||
|
|
|
@ -611,7 +611,7 @@ private:
|
|||
peep->NauseaTolerance = value;
|
||||
break;
|
||||
case GUEST_PARAMETER_TOILET:
|
||||
peep->toilet = value;
|
||||
peep->Toilet = value;
|
||||
break;
|
||||
case GUEST_PARAMETER_PREFERRED_RIDE_INTENSITY:
|
||||
peep->Intensity = IntensityRange(value, 15);
|
||||
|
|
|
@ -734,8 +734,8 @@ void Guest::Tick128UpdateGuest(int32_t index)
|
|||
|
||||
if (PeepFlags & PEEP_FLAGS_TOILET)
|
||||
{
|
||||
if (toilet <= 180)
|
||||
toilet += 50;
|
||||
if (Toilet <= 180)
|
||||
Toilet += 50;
|
||||
}
|
||||
|
||||
if (PeepFlags & PEEP_FLAGS_HAPPINESS)
|
||||
|
@ -861,7 +861,7 @@ void Guest::Tick128UpdateGuest(int32_t index)
|
|||
possible_thoughts[num_thoughts++] = PEEP_THOUGHT_TYPE_THIRSTY;
|
||||
}
|
||||
|
||||
if (toilet >= 160)
|
||||
if (Toilet >= 160)
|
||||
{
|
||||
possible_thoughts[num_thoughts++] = PEEP_THOUGHT_TYPE_TOILET;
|
||||
}
|
||||
|
@ -939,7 +939,7 @@ void Guest::Tick128UpdateGuest(int32_t index)
|
|||
if (thirst >= 5)
|
||||
{
|
||||
thirst -= 4;
|
||||
toilet = std::min(255, toilet + 3);
|
||||
Toilet = std::min(255, Toilet + 3);
|
||||
}
|
||||
|
||||
if (nausea_target >= 50)
|
||||
|
@ -1036,9 +1036,9 @@ void Guest::Tick128UpdateGuest(int32_t index)
|
|||
thirst = std::max(thirst - 1, 0);
|
||||
}
|
||||
|
||||
if (toilet >= 195)
|
||||
if (Toilet >= 195)
|
||||
{
|
||||
toilet--;
|
||||
Toilet--;
|
||||
}
|
||||
|
||||
if (state == PEEP_STATE_WALKING && nausea_target >= 128)
|
||||
|
@ -1076,7 +1076,7 @@ void Guest::Tick128UpdateGuest(int32_t index)
|
|||
{
|
||||
hunger = std::min(hunger + 7, 255);
|
||||
thirst = std::max(thirst - 3, 0);
|
||||
toilet = std::min(toilet + 2, 255);
|
||||
Toilet = std::min(Toilet + 2, 255);
|
||||
}
|
||||
|
||||
if (TimeToConsume == 0)
|
||||
|
@ -2263,7 +2263,7 @@ bool Guest::ShouldGoToShop(Ride* ride, bool peepAtShop)
|
|||
|
||||
if (ride->type == RIDE_TYPE_TOILETS)
|
||||
{
|
||||
if (toilet < 70)
|
||||
if (Toilet < 70)
|
||||
{
|
||||
ChoseNotToGoOnRide(ride, peepAtShop, true);
|
||||
return false;
|
||||
|
@ -2271,7 +2271,7 @@ bool Guest::ShouldGoToShop(Ride* ride, bool peepAtShop)
|
|||
|
||||
// The amount that peeps are willing to pay to use the Toilets scales with their toilet stat.
|
||||
// It effectively has a minimum of $0.10 (due to the check above) and a maximum of $0.60.
|
||||
if (ride_get_price(ride) * 40 > toilet)
|
||||
if (ride_get_price(ride) * 40 > Toilet)
|
||||
{
|
||||
if (peepAtShop)
|
||||
{
|
||||
|
@ -2882,7 +2882,7 @@ static bool peep_should_go_on_ride_again(Peep* peep, Ride* ride)
|
|||
return false;
|
||||
if (peep->thirst < 20)
|
||||
return false;
|
||||
if (peep->toilet > 170)
|
||||
if (peep->Toilet > 170)
|
||||
return false;
|
||||
|
||||
uint8_t r = (scenario_rand() & 0xFF);
|
||||
|
@ -3052,7 +3052,7 @@ static void peep_update_hunger(Peep* peep)
|
|||
peep->hunger -= 2;
|
||||
|
||||
peep->energy_target = std::min(peep->energy_target + 2, PEEP_MAX_ENERGY_TARGET);
|
||||
peep->toilet = std::min(peep->toilet + 1, 255);
|
||||
peep->Toilet = std::min(peep->Toilet + 1, 255);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5073,9 +5073,9 @@ void Guest::UpdateRideShopInteract()
|
|||
return;
|
||||
}
|
||||
|
||||
if (toilet != 0)
|
||||
if (Toilet != 0)
|
||||
{
|
||||
toilet--;
|
||||
Toilet--;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -5418,7 +5418,7 @@ void Guest::UpdateWalking()
|
|||
if (happiness < 120)
|
||||
return;
|
||||
|
||||
if (toilet > 140)
|
||||
if (Toilet > 140)
|
||||
return;
|
||||
|
||||
uint16_t chance = HasFood() ? 13107 : 2849;
|
||||
|
@ -6932,7 +6932,7 @@ void Guest::UpdateSpriteType()
|
|||
return;
|
||||
}
|
||||
|
||||
if (toilet > 220)
|
||||
if (Toilet > 220)
|
||||
{
|
||||
SetSpriteType(PEEP_SPRITE_TYPE_REQUIRE_TOILET);
|
||||
return;
|
||||
|
|
|
@ -1713,7 +1713,7 @@ Peep* Peep::Generate(const CoordsXYZ& coords)
|
|||
/* Adjust by the delta, clamping at min=0 and max=255. */
|
||||
peep->thirst = std::clamp(peep->thirst + thirstDelta, 0, PEEP_MAX_THIRST);
|
||||
|
||||
peep->toilet = 0;
|
||||
peep->Toilet = 0;
|
||||
peep->TimeToConsume = 0;
|
||||
std::fill_n(peep->RidesBeenOn, 32, 0x00);
|
||||
|
||||
|
|
|
@ -623,7 +623,7 @@ struct Peep : SpriteBase
|
|||
uint8_t nausea_target;
|
||||
uint8_t hunger;
|
||||
uint8_t thirst;
|
||||
uint8_t toilet;
|
||||
uint8_t Toilet;
|
||||
uint8_t Mass;
|
||||
uint8_t TimeToConsume;
|
||||
IntensityRange Intensity;
|
||||
|
|
|
@ -1456,7 +1456,7 @@ private:
|
|||
dst->nausea_target = src->nausea_target;
|
||||
dst->hunger = src->hunger;
|
||||
dst->thirst = src->thirst;
|
||||
dst->toilet = src->toilet;
|
||||
dst->Toilet = src->toilet;
|
||||
dst->Mass = src->mass;
|
||||
|
||||
dst->LitterCount = src->litter_count;
|
||||
|
|
|
@ -1157,7 +1157,7 @@ void S6Exporter::ExportSpritePeep(RCT2SpritePeep* dst, const Peep* src)
|
|||
dst->nausea_target = src->nausea_target;
|
||||
dst->hunger = src->hunger;
|
||||
dst->thirst = src->thirst;
|
||||
dst->toilet = src->toilet;
|
||||
dst->toilet = src->Toilet;
|
||||
dst->mass = src->Mass;
|
||||
dst->time_to_consume = src->TimeToConsume;
|
||||
dst->intensity = static_cast<uint8_t>(src->Intensity);
|
||||
|
|
|
@ -1422,7 +1422,7 @@ public:
|
|||
dst->nausea_target = src->nausea_target;
|
||||
dst->hunger = src->hunger;
|
||||
dst->thirst = src->thirst;
|
||||
dst->toilet = src->toilet;
|
||||
dst->Toilet = src->toilet;
|
||||
dst->Mass = src->mass;
|
||||
dst->TimeToConsume = src->time_to_consume;
|
||||
dst->Intensity = static_cast<IntensityRange>(src->intensity);
|
||||
|
|
|
@ -551,7 +551,7 @@ namespace OpenRCT2::Scripting
|
|||
uint8_t toilet_get() const
|
||||
{
|
||||
auto peep = GetPeep();
|
||||
return peep != nullptr ? peep->toilet : 0;
|
||||
return peep != nullptr ? peep->Toilet : 0;
|
||||
}
|
||||
void toilet_set(uint8_t value)
|
||||
{
|
||||
|
@ -559,7 +559,7 @@ namespace OpenRCT2::Scripting
|
|||
auto peep = GetPeep();
|
||||
if (peep != nullptr)
|
||||
{
|
||||
peep->toilet = value;
|
||||
peep->Toilet = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -179,7 +179,7 @@ static void CompareSpriteDataPeep(const Peep& left, const Peep& right)
|
|||
COMPARE_FIELD(nausea_target);
|
||||
COMPARE_FIELD(hunger);
|
||||
COMPARE_FIELD(thirst);
|
||||
COMPARE_FIELD(toilet);
|
||||
COMPARE_FIELD(Toilet);
|
||||
COMPARE_FIELD(Mass);
|
||||
COMPARE_FIELD(TimeToConsume);
|
||||
COMPARE_FIELD(Intensity);
|
||||
|
|
Loading…
Reference in New Issue