1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 11:03:00 +01:00

Rename total ride value to total ride value for money

This commit is contained in:
Ted John
2017-10-25 12:24:17 +01:00
committed by Michael Steenbeek
parent 4290d0a65d
commit be4fe7b681
9 changed files with 19 additions and 19 deletions

View File

@@ -194,10 +194,10 @@ static bool award_is_deserved_best_value(sint32 awardType, sint32 activeAwardTyp
if (gParkFlags & (PARK_FLAGS_NO_MONEY | PARK_FLAGS_PARK_FREE_ENTRY))
return 0;
if (gTotalRideValue < MONEY(10, 00))
if (gTotalRideValueForMoney < MONEY(10, 00))
return 0;
if (park_get_entrance_fee() + MONEY(0, 10) >= gTotalRideValue / 2)
if (park_get_entrance_fee() + MONEY(0, 10) >= gTotalRideValueForMoney / 2)
return 0;
return 1;
@@ -251,7 +251,7 @@ static bool award_is_deserved_worst_value(sint32 awardType, sint32 activeAwardTy
money32 parkEntranceFee = park_get_entrance_fee();
if (parkEntranceFee == MONEY(0, 00))
return 0;
if (gTotalRideValue >= parkEntranceFee)
if (parkEntranceFee <= gTotalRideValueForMoney)
return 0;
return 1;
}

View File

@@ -647,7 +647,7 @@ typedef struct rct1_s4 {
uint32 unk_19953E;
uint16 cheat_detection_land_owned;
uint16 unk_199544;
money16 median_recommended_park_entry_fee;
money16 total_ride_value_for_money;
money32 max_loan;
money16 guest_initial_cash;
uint8 guest_initial_hunger;

View File

@@ -256,7 +256,7 @@ void S6Exporter::Export()
_s6.guest_initial_happiness = gGuestInitialHappiness;
_s6.park_size = gParkSize;
_s6.guest_generation_probability = _guestGenerationProbability;
_s6.total_ride_value = gTotalRideValue;
_s6.total_ride_value_for_money = gTotalRideValueForMoney;
_s6.maximum_loan = gMaxBankLoan;
_s6.guest_initial_cash = gGuestInitialCash;
_s6.guest_initial_hunger = gGuestInitialHunger;

View File

@@ -267,7 +267,7 @@ public:
gGuestInitialHappiness = _s6.guest_initial_happiness;
gParkSize = _s6.park_size;
_guestGenerationProbability = _s6.guest_generation_probability;
gTotalRideValue = _s6.total_ride_value;
gTotalRideValueForMoney = _s6.total_ride_value_for_money;
gMaxBankLoan = _s6.maximum_loan;
gGuestInitialCash = _s6.guest_initial_cash;
gGuestInitialHunger = _s6.guest_initial_hunger;

View File

@@ -147,7 +147,7 @@ sint32 gRideRemoveTrackPieceCallbackZ;
sint32 gRideRemoveTrackPieceCallbackDirection;
sint32 gRideRemoveTrackPieceCallbackType;
money16 gTotalRideValue;
money16 gTotalRideValueForMoney;
uint32 gSamePriceThroughoutParkA;
uint32 gSamePriceThroughoutParkB;

View File

@@ -954,7 +954,7 @@ rct_ride_measurement * get_ride_measurement(sint32 index);
for (i = 0; i < MAX_RIDES; i++) \
if ((ride = get_ride(i))->type != RIDE_TYPE_NULL)
extern money16 gTotalRideValue;
extern money16 gTotalRideValueForMoney;
extern uint32 gSamePriceThroughoutParkA;
extern uint32 gSamePriceThroughoutParkB;

View File

@@ -255,7 +255,7 @@ void scenario_success_submit_name(const char *name)
static void scenario_entrance_fee_too_high_check()
{
uint16 x = 0, y = 0;
money16 totalRideValue = gTotalRideValue;
money16 totalRideValue = gTotalRideValueForMoney;
money16 max_fee = totalRideValue + (totalRideValue / 2);
if ((gParkFlags & PARK_FLAGS_PARK_OPEN) && park_get_entrance_fee() > max_fee) {

View File

@@ -174,7 +174,7 @@ typedef struct rct_s6_data {
uint8 guest_initial_happiness;
uint16 park_size;
uint16 guest_generation_probability;
uint16 total_ride_value;
uint16 total_ride_value_for_money;
money32 maximum_loan;
money16 guest_initial_cash;
uint8 guest_initial_hunger;

View File

@@ -96,7 +96,7 @@ void park_init()
gGuestChangeModifier = 0;
gParkRating = 0;
_guestGenerationProbability = 0;
gTotalRideValue = 0;
gTotalRideValueForMoney = 0;
gResearchLastItemSubject = (uint32)-1;
for (i = 0; i < 20; i++)
@@ -367,12 +367,12 @@ static sint32 park_calculate_guest_generation_probability()
{
uint32 probability;
sint32 i, suggestedMaxGuests;
money16 totalRideValue;
money16 totalRideValueForMoney;
Ride *ride;
// Calculate suggested guest maximum (based on ride type) and total ride value
suggestedMaxGuests = 0;
totalRideValue = 0;
totalRideValueForMoney = 0;
FOR_ALL_RIDES(i, ride) {
if (ride->status != RIDE_STATUS_OPEN)
continue;
@@ -386,9 +386,9 @@ static sint32 park_calculate_guest_generation_probability()
// Add ride value
if (ride->value != RIDE_VALUE_UNDEFINED) {
money16 rideValue = (money16)(ride->value - ride->price);
if (rideValue > 0) {
totalRideValue += rideValue * 2;
money16 rideValueForMoney = (money16)(ride->value - ride->price);
if (rideValueForMoney > 0) {
totalRideValueForMoney += rideValueForMoney * 2;
}
}
}
@@ -419,7 +419,7 @@ static sint32 park_calculate_guest_generation_probability()
}
suggestedMaxGuests = min(suggestedMaxGuests, 65535);
gTotalRideValue = totalRideValue;
gTotalRideValueForMoney = totalRideValueForMoney;
_suggestedGuestMaximum = suggestedMaxGuests;
// Begin with 50 + park rating
@@ -441,11 +441,11 @@ static sint32 park_calculate_guest_generation_probability()
// Penalty for overpriced entrance fee relative to total ride value
money16 entranceFee = park_get_entrance_fee();
if (entranceFee > totalRideValue) {
if (entranceFee > totalRideValueForMoney) {
probability /= 4;
// Extra penalty for very overpriced entrance fee
if (entranceFee / 2 > totalRideValue)
if (entranceFee / 2 > totalRideValueForMoney)
probability /= 4;
}