mirror of https://github.com/OpenRCT2/OpenRCT2.git
Rename Peep::thirst to Thirst
This commit is contained in:
parent
3dd4adeb81
commit
aad80d3390
|
@ -1454,7 +1454,7 @@ void window_guest_stats_paint(rct_window* w, rct_drawpixelinfo* dpi)
|
|||
y += LIST_ROW_HEIGHT;
|
||||
gfx_draw_string_left(dpi, STR_GUEST_STAT_THIRST_LABEL, gCommonFormatArgs, COLOUR_BLACK, x, y);
|
||||
|
||||
int32_t thirst = peep->thirst;
|
||||
int32_t thirst = peep->Thirst;
|
||||
if (thirst > 190)
|
||||
thirst = 190;
|
||||
|
||||
|
|
|
@ -234,7 +234,7 @@ struct GameStateSnapshots final : public IGameStateSnapshots
|
|||
COMPARE_FIELD(Peep, nausea);
|
||||
COMPARE_FIELD(Peep, nausea_target);
|
||||
COMPARE_FIELD(Peep, hunger);
|
||||
COMPARE_FIELD(Peep, thirst);
|
||||
COMPARE_FIELD(Peep, Thirst);
|
||||
COMPARE_FIELD(Peep, Toilet);
|
||||
COMPARE_FIELD(Peep, Mass);
|
||||
COMPARE_FIELD(Peep, TimeToConsume);
|
||||
|
|
|
@ -601,7 +601,7 @@ private:
|
|||
peep->hunger = value;
|
||||
break;
|
||||
case GUEST_PARAMETER_THIRST:
|
||||
peep->thirst = value;
|
||||
peep->Thirst = value;
|
||||
break;
|
||||
case GUEST_PARAMETER_NAUSEA:
|
||||
peep->nausea = value;
|
||||
|
|
|
@ -856,7 +856,7 @@ void Guest::Tick128UpdateGuest(int32_t index)
|
|||
possible_thoughts[num_thoughts++] = PEEP_THOUGHT_TYPE_HUNGRY;
|
||||
}
|
||||
|
||||
if (thirst <= 25 && !HasFood())
|
||||
if (Thirst <= 25 && !HasFood())
|
||||
{
|
||||
possible_thoughts[num_thoughts++] = PEEP_THOUGHT_TYPE_THIRSTY;
|
||||
}
|
||||
|
@ -936,9 +936,9 @@ void Guest::Tick128UpdateGuest(int32_t index)
|
|||
if (energy_target <= 135)
|
||||
energy_target += 5;
|
||||
|
||||
if (thirst >= 5)
|
||||
if (Thirst >= 5)
|
||||
{
|
||||
thirst -= 4;
|
||||
Thirst -= 4;
|
||||
Toilet = std::min(255, Toilet + 3);
|
||||
}
|
||||
|
||||
|
@ -1031,9 +1031,9 @@ void Guest::Tick128UpdateGuest(int32_t index)
|
|||
hunger = std::max(hunger - 1, 0);
|
||||
}
|
||||
|
||||
if (thirst < 10)
|
||||
if (Thirst < 10)
|
||||
{
|
||||
thirst = std::max(thirst - 1, 0);
|
||||
Thirst = std::max(Thirst - 1, 0);
|
||||
}
|
||||
|
||||
if (Toilet >= 195)
|
||||
|
@ -1070,12 +1070,12 @@ void Guest::Tick128UpdateGuest(int32_t index)
|
|||
|
||||
if (HasDrink())
|
||||
{
|
||||
thirst = std::min(thirst + 7, 255);
|
||||
Thirst = std::min(Thirst + 7, 255);
|
||||
}
|
||||
else
|
||||
{
|
||||
hunger = std::min(hunger + 7, 255);
|
||||
thirst = std::max(thirst - 3, 0);
|
||||
Thirst = std::max(Thirst - 3, 0);
|
||||
Toilet = std::min(Toilet + 2, 255);
|
||||
}
|
||||
|
||||
|
@ -1528,7 +1528,7 @@ bool Guest::DecideAndBuyItem(Ride* ride, int32_t shopItem, money32 price)
|
|||
return false;
|
||||
}
|
||||
|
||||
if (ShopItems[shopItem].IsDrink() && (thirst > 75))
|
||||
if (ShopItems[shopItem].IsDrink() && (Thirst > 75))
|
||||
{
|
||||
InsertNewThought(PEEP_THOUGHT_TYPE_NOT_THIRSTY, PEEP_THOUGHT_ITEM_NONE);
|
||||
return false;
|
||||
|
@ -2880,7 +2880,7 @@ static bool peep_should_go_on_ride_again(Peep* peep, Ride* ride)
|
|||
return false;
|
||||
if (peep->hunger < 30)
|
||||
return false;
|
||||
if (peep->thirst < 20)
|
||||
if (peep->Thirst < 20)
|
||||
return false;
|
||||
if (peep->Toilet > 170)
|
||||
return false;
|
||||
|
@ -3069,9 +3069,9 @@ static void peep_decide_whether_to_leave_park(Peep* peep)
|
|||
peep->energy_target -= 2;
|
||||
}
|
||||
|
||||
if (gClimateCurrent.Temperature >= 21 && peep->thirst >= 5)
|
||||
if (gClimateCurrent.Temperature >= 21 && peep->Thirst >= 5)
|
||||
{
|
||||
peep->thirst--;
|
||||
peep->Thirst--;
|
||||
}
|
||||
|
||||
if (peep->outside_of_park != 0)
|
||||
|
|
|
@ -1707,11 +1707,11 @@ Peep* Peep::Generate(const CoordsXYZ& coords)
|
|||
/* Scenario editor limits initial guest thirst to between 37..253.
|
||||
* To be on the safe side, assume the value could have been hacked
|
||||
* to any value 0..255. */
|
||||
peep->thirst = gGuestInitialThirst;
|
||||
peep->Thirst = gGuestInitialThirst;
|
||||
/* Initial value will vary by -15..16 */
|
||||
int8_t thirstDelta = (scenario_rand() & 0x1F) - 15;
|
||||
/* Adjust by the delta, clamping at min=0 and max=255. */
|
||||
peep->thirst = std::clamp(peep->thirst + thirstDelta, 0, PEEP_MAX_THIRST);
|
||||
peep->Thirst = std::clamp(peep->Thirst + thirstDelta, 0, PEEP_MAX_THIRST);
|
||||
|
||||
peep->Toilet = 0;
|
||||
peep->TimeToConsume = 0;
|
||||
|
|
|
@ -622,7 +622,7 @@ struct Peep : SpriteBase
|
|||
uint8_t nausea;
|
||||
uint8_t nausea_target;
|
||||
uint8_t hunger;
|
||||
uint8_t thirst;
|
||||
uint8_t Thirst;
|
||||
uint8_t Toilet;
|
||||
uint8_t Mass;
|
||||
uint8_t TimeToConsume;
|
||||
|
|
|
@ -1455,7 +1455,7 @@ private:
|
|||
dst->nausea = src->nausea;
|
||||
dst->nausea_target = src->nausea_target;
|
||||
dst->hunger = src->hunger;
|
||||
dst->thirst = src->thirst;
|
||||
dst->Thirst = src->thirst;
|
||||
dst->Toilet = src->toilet;
|
||||
dst->Mass = src->mass;
|
||||
|
||||
|
|
|
@ -1156,7 +1156,7 @@ void S6Exporter::ExportSpritePeep(RCT2SpritePeep* dst, const Peep* src)
|
|||
dst->nausea = src->nausea;
|
||||
dst->nausea_target = src->nausea_target;
|
||||
dst->hunger = src->hunger;
|
||||
dst->thirst = src->thirst;
|
||||
dst->thirst = src->Thirst;
|
||||
dst->toilet = src->Toilet;
|
||||
dst->mass = src->Mass;
|
||||
dst->time_to_consume = src->TimeToConsume;
|
||||
|
|
|
@ -1421,7 +1421,7 @@ public:
|
|||
dst->nausea = src->nausea;
|
||||
dst->nausea_target = src->nausea_target;
|
||||
dst->hunger = src->hunger;
|
||||
dst->thirst = src->thirst;
|
||||
dst->Thirst = src->thirst;
|
||||
dst->Toilet = src->toilet;
|
||||
dst->Mass = src->mass;
|
||||
dst->TimeToConsume = src->time_to_consume;
|
||||
|
|
|
@ -536,7 +536,7 @@ namespace OpenRCT2::Scripting
|
|||
uint8_t thirst_get() const
|
||||
{
|
||||
auto peep = GetPeep();
|
||||
return peep != nullptr ? peep->thirst : 0;
|
||||
return peep != nullptr ? peep->Thirst : 0;
|
||||
}
|
||||
void thirst_set(uint8_t value)
|
||||
{
|
||||
|
@ -544,7 +544,7 @@ namespace OpenRCT2::Scripting
|
|||
auto peep = GetPeep();
|
||||
if (peep != nullptr)
|
||||
{
|
||||
peep->thirst = value;
|
||||
peep->Thirst = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -178,7 +178,7 @@ static void CompareSpriteDataPeep(const Peep& left, const Peep& right)
|
|||
COMPARE_FIELD(nausea);
|
||||
COMPARE_FIELD(nausea_target);
|
||||
COMPARE_FIELD(hunger);
|
||||
COMPARE_FIELD(thirst);
|
||||
COMPARE_FIELD(Thirst);
|
||||
COMPARE_FIELD(Toilet);
|
||||
COMPARE_FIELD(Mass);
|
||||
COMPARE_FIELD(TimeToConsume);
|
||||
|
|
Loading…
Reference in New Issue