mirror of https://github.com/OpenRCT2/OpenRCT2.git
Rename gTotalRideValue to gTotalRideValueForMoney
This commit is contained in:
parent
5a7e34a267
commit
1db2a4986f
|
@ -250,8 +250,8 @@ void scenario_success_submit_name(const char *name)
|
||||||
static void scenario_entrance_fee_too_high_check()
|
static void scenario_entrance_fee_too_high_check()
|
||||||
{
|
{
|
||||||
uint16 x = 0, y = 0;
|
uint16 x = 0, y = 0;
|
||||||
money16 totalRideValue = gTotalRideValueForMoney;
|
money16 totalRideValueForMoney = gTotalRideValueForMoney;
|
||||||
money16 max_fee = totalRideValue + (totalRideValue / 2);
|
money16 max_fee = totalRideValueForMoney + (totalRideValueForMoney / 2);
|
||||||
|
|
||||||
if ((gParkFlags & PARK_FLAGS_PARK_OPEN) && park_get_entrance_fee() > max_fee) {
|
if ((gParkFlags & PARK_FLAGS_PARK_OPEN) && park_get_entrance_fee() > max_fee) {
|
||||||
for (sint32 i = 0; i < MAX_PARK_ENTRANCES && gParkEntrances[i].x != LOCATION_NULL; i++) {
|
for (sint32 i = 0; i < MAX_PARK_ENTRANCES && gParkEntrances[i].x != LOCATION_NULL; i++) {
|
||||||
|
|
|
@ -599,7 +599,7 @@ void Park::Update()
|
||||||
gParkRating = CalculateParkRating();
|
gParkRating = CalculateParkRating();
|
||||||
gParkValue = CalculateParkValue();
|
gParkValue = CalculateParkValue();
|
||||||
gCompanyValue = CalculateCompanyValue();
|
gCompanyValue = CalculateCompanyValue();
|
||||||
gTotalRideValueForMoney = CalculateTotalRideValue();
|
gTotalRideValueForMoney = CalculateTotalRideValueForMoney();
|
||||||
_suggestedGuestMaximum = CalculateSuggestedMaxGuests();
|
_suggestedGuestMaximum = CalculateSuggestedMaxGuests();
|
||||||
_guestGenerationProbability = CalculateGuestGenerationProbability();
|
_guestGenerationProbability = CalculateGuestGenerationProbability();
|
||||||
|
|
||||||
|
@ -787,7 +787,6 @@ money32 Park::CalculateRideValue(const Ride * ride) const
|
||||||
if (ride->type != RIDE_TYPE_NULL &&
|
if (ride->type != RIDE_TYPE_NULL &&
|
||||||
ride->value != RIDE_VALUE_UNDEFINED)
|
ride->value != RIDE_VALUE_UNDEFINED)
|
||||||
{
|
{
|
||||||
// Fair value * (...)
|
|
||||||
result = (ride->value * 10) * (ride_customers_in_last_5_minutes(ride) + rideBonusValue[ride->type] * 4);
|
result = (ride->value * 10) * (ride_customers_in_last_5_minutes(ride) + rideBonusValue[ride->type] * 4);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
@ -798,7 +797,7 @@ money32 Park::CalculateCompanyValue() const
|
||||||
return finance_get_current_cash() + gParkValue - gBankLoan;
|
return finance_get_current_cash() + gParkValue - gBankLoan;
|
||||||
}
|
}
|
||||||
|
|
||||||
money16 Park::CalculateTotalRideValue() const
|
money16 Park::CalculateTotalRideValueForMoney() const
|
||||||
{
|
{
|
||||||
money16 totalRideValue = 0;
|
money16 totalRideValue = 0;
|
||||||
sint32 i;
|
sint32 i;
|
||||||
|
|
|
@ -74,9 +74,6 @@ namespace OpenRCT2
|
||||||
sint32 CalculateParkRating() const;
|
sint32 CalculateParkRating() const;
|
||||||
money32 CalculateParkValue() const;
|
money32 CalculateParkValue() const;
|
||||||
money32 CalculateCompanyValue() const;
|
money32 CalculateCompanyValue() const;
|
||||||
money16 CalculateTotalRideValue() const;
|
|
||||||
uint32 CalculateSuggestedMaxGuests() const;
|
|
||||||
uint32 CalculateGuestGenerationProbability() const;
|
|
||||||
static uint8 CalculateGuestInitialHappiness(uint8 percentage);
|
static uint8 CalculateGuestInitialHappiness(uint8 percentage);
|
||||||
|
|
||||||
rct_peep * GenerateGuest();
|
rct_peep * GenerateGuest();
|
||||||
|
@ -85,10 +82,14 @@ namespace OpenRCT2
|
||||||
void UpdateHistories();
|
void UpdateHistories();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
money32 CalculateRideValue(const Ride * ride) const;
|
money32 CalculateRideValue(const Ride * ride) const;
|
||||||
|
money16 CalculateTotalRideValueForMoney() const;
|
||||||
|
uint32 CalculateSuggestedMaxGuests() const;
|
||||||
|
uint32 CalculateGuestGenerationProbability() const;
|
||||||
|
|
||||||
void GenerateGuests();
|
void GenerateGuests();
|
||||||
rct_peep * GenerateGuestFromCampaign(sint32 campaign);
|
rct_peep * GenerateGuestFromCampaign(sint32 campaign);
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue