mirror of https://github.com/OpenRCT2/OpenRCT2.git
Rename Peep::voucher_arguments to VoucherArguments
This commit is contained in:
parent
99bbfc9034
commit
bf228abf55
|
@ -1963,7 +1963,7 @@ static rct_string_id window_guest_inventory_format_item(Peep* peep, int32_t item
|
|||
set_format_arg(10, const char*, parkName);
|
||||
break;
|
||||
case VOUCHER_TYPE_RIDE_FREE:
|
||||
ride = get_ride(peep->voucher_arguments);
|
||||
ride = get_ride(peep->VoucherArguments);
|
||||
if (ride != nullptr)
|
||||
{
|
||||
set_format_arg(6, rct_string_id, STR_PEEP_INVENTORY_VOUCHER_RIDE_FREE);
|
||||
|
@ -1977,7 +1977,7 @@ static rct_string_id window_guest_inventory_format_item(Peep* peep, int32_t item
|
|||
break;
|
||||
case VOUCHER_TYPE_FOOD_OR_DRINK_FREE:
|
||||
set_format_arg(6, rct_string_id, STR_PEEP_INVENTORY_VOUCHER_FOOD_OR_DRINK_FREE);
|
||||
set_format_arg(8, rct_string_id, ShopItems[peep->voucher_arguments].Naming.Singular);
|
||||
set_format_arg(8, rct_string_id, ShopItems[peep->VoucherArguments].Naming.Singular);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -303,7 +303,7 @@ struct GameStateSnapshots final : public IGameStateSnapshots
|
|||
COMPARE_FIELD(Peep, no_of_souvenirs);
|
||||
COMPARE_FIELD(Peep, vandalism_seen);
|
||||
COMPARE_FIELD(Peep, voucher_type);
|
||||
COMPARE_FIELD(Peep, voucher_arguments);
|
||||
COMPARE_FIELD(Peep, VoucherArguments);
|
||||
COMPARE_FIELD(Peep, SurroundingsThoughtTimeout);
|
||||
COMPARE_FIELD(Peep, Angriness);
|
||||
COMPARE_FIELD(Peep, TimeLost);
|
||||
|
|
|
@ -178,7 +178,7 @@ private:
|
|||
// remove any free voucher for this ride from peep
|
||||
if (peep->ItemStandardFlags & PEEP_ITEM_VOUCHER)
|
||||
{
|
||||
if (peep->voucher_type == VOUCHER_TYPE_RIDE_FREE && peep->voucher_arguments == _rideIndex)
|
||||
if (peep->voucher_type == VOUCHER_TYPE_RIDE_FREE && peep->VoucherArguments == _rideIndex)
|
||||
{
|
||||
peep->ItemStandardFlags &= ~(PEEP_ITEM_VOUCHER);
|
||||
}
|
||||
|
|
|
@ -141,7 +141,7 @@ void marketing_set_guest_campaign(Peep* peep, int32_t campaignType)
|
|||
case ADVERTISING_CAMPAIGN_RIDE_FREE:
|
||||
peep->ItemStandardFlags |= PEEP_ITEM_VOUCHER;
|
||||
peep->voucher_type = VOUCHER_TYPE_RIDE_FREE;
|
||||
peep->voucher_arguments = campaign->RideId;
|
||||
peep->VoucherArguments = campaign->RideId;
|
||||
peep->guest_heading_to_ride_id = campaign->RideId;
|
||||
peep->peep_is_lost_countdown = 240;
|
||||
break;
|
||||
|
@ -152,7 +152,7 @@ void marketing_set_guest_campaign(Peep* peep, int32_t campaignType)
|
|||
case ADVERTISING_CAMPAIGN_FOOD_OR_DRINK_FREE:
|
||||
peep->ItemStandardFlags |= PEEP_ITEM_VOUCHER;
|
||||
peep->voucher_type = VOUCHER_TYPE_FOOD_OR_DRINK_FREE;
|
||||
peep->voucher_arguments = campaign->ShopItemType;
|
||||
peep->VoucherArguments = campaign->ShopItemType;
|
||||
break;
|
||||
case ADVERTISING_CAMPAIGN_PARK:
|
||||
break;
|
||||
|
|
|
@ -1482,7 +1482,7 @@ bool Guest::DecideAndBuyItem(Ride* ride, int32_t shopItem, money32 price)
|
|||
bool hasVoucher = false;
|
||||
|
||||
if ((ItemStandardFlags & PEEP_ITEM_VOUCHER) && (voucher_type == VOUCHER_TYPE_FOOD_OR_DRINK_FREE)
|
||||
&& (voucher_arguments == shopItem))
|
||||
&& (VoucherArguments == shopItem))
|
||||
{
|
||||
hasVoucher = true;
|
||||
}
|
||||
|
@ -2414,7 +2414,7 @@ void Guest::ReadMap()
|
|||
static bool peep_has_voucher_for_free_ride(Peep* peep, Ride* ride)
|
||||
{
|
||||
return peep->ItemStandardFlags & PEEP_ITEM_VOUCHER && peep->voucher_type == VOUCHER_TYPE_RIDE_FREE
|
||||
&& peep->voucher_arguments == ride->id;
|
||||
&& peep->VoucherArguments == ride->id;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2635,7 +2635,7 @@ static void peep_update_ride_at_entrance_try_leave(Guest* peep)
|
|||
static bool peep_check_ride_price_at_entrance(Guest* peep, Ride* ride, money32 ridePrice)
|
||||
{
|
||||
if ((peep->ItemStandardFlags & PEEP_ITEM_VOUCHER) && peep->voucher_type == VOUCHER_TYPE_RIDE_FREE
|
||||
&& peep->voucher_arguments == peep->current_ride)
|
||||
&& peep->VoucherArguments == peep->current_ride)
|
||||
return true;
|
||||
|
||||
if (peep->cash_in_pocket <= 0 && !(gParkFlags & PARK_FLAGS_NO_MONEY))
|
||||
|
@ -3858,7 +3858,7 @@ void Guest::UpdateRideFreeVehicleEnterRide(Ride* ride)
|
|||
if (ridePrice != 0)
|
||||
{
|
||||
if ((ItemStandardFlags & PEEP_ITEM_VOUCHER) && (voucher_type == VOUCHER_TYPE_RIDE_FREE)
|
||||
&& (voucher_arguments == current_ride))
|
||||
&& (VoucherArguments == current_ride))
|
||||
{
|
||||
ItemStandardFlags &= ~PEEP_ITEM_VOUCHER;
|
||||
window_invalidate_flags |= PEEP_INVALIDATE_PEEP_INVENTORY;
|
||||
|
|
|
@ -737,7 +737,7 @@ struct Peep : SpriteBase
|
|||
uint8_t no_of_souvenirs;
|
||||
uint8_t vandalism_seen; // 0xC0 vandalism thought timeout, 0x3F vandalism tiles seen
|
||||
uint8_t voucher_type;
|
||||
uint8_t voucher_arguments; // ride_id or string_offset_id
|
||||
uint8_t VoucherArguments; // ride_id or string_offset_id
|
||||
uint8_t SurroundingsThoughtTimeout;
|
||||
uint8_t Angriness;
|
||||
uint8_t TimeLost; // the time the peep has been lost when it reaches 254 generates the lost thought
|
||||
|
|
|
@ -1494,7 +1494,7 @@ private:
|
|||
dst->paid_on_food = src->paid_on_food;
|
||||
dst->paid_on_souvenirs = src->paid_on_souvenirs;
|
||||
|
||||
dst->voucher_arguments = src->voucher_arguments;
|
||||
dst->VoucherArguments = src->voucher_arguments;
|
||||
dst->voucher_type = src->voucher_type;
|
||||
|
||||
dst->SurroundingsThoughtTimeout = src->surroundings_thought_timeout;
|
||||
|
|
|
@ -1230,7 +1230,7 @@ void S6Exporter::ExportSpritePeep(RCT2SpritePeep* dst, const Peep* src)
|
|||
dst->no_of_souvenirs = src->no_of_souvenirs;
|
||||
dst->vandalism_seen = src->vandalism_seen;
|
||||
dst->voucher_type = src->voucher_type;
|
||||
dst->voucher_arguments = src->voucher_arguments;
|
||||
dst->voucher_arguments = src->VoucherArguments;
|
||||
dst->surroundings_thought_timeout = src->SurroundingsThoughtTimeout;
|
||||
dst->angriness = src->Angriness;
|
||||
dst->time_lost = src->TimeLost;
|
||||
|
|
|
@ -1495,7 +1495,7 @@ public:
|
|||
dst->no_of_souvenirs = src->no_of_souvenirs;
|
||||
dst->vandalism_seen = src->vandalism_seen;
|
||||
dst->voucher_type = src->voucher_type;
|
||||
dst->voucher_arguments = src->voucher_arguments;
|
||||
dst->VoucherArguments = src->voucher_arguments;
|
||||
dst->SurroundingsThoughtTimeout = src->surroundings_thought_timeout;
|
||||
dst->Angriness = src->angriness;
|
||||
dst->TimeLost = src->time_lost;
|
||||
|
|
|
@ -256,7 +256,7 @@ static void CompareSpriteDataPeep(const Peep& left, const Peep& right)
|
|||
COMPARE_FIELD(no_of_souvenirs);
|
||||
COMPARE_FIELD(vandalism_seen);
|
||||
COMPARE_FIELD(voucher_type);
|
||||
COMPARE_FIELD(voucher_arguments);
|
||||
COMPARE_FIELD(VoucherArguments);
|
||||
COMPARE_FIELD(SurroundingsThoughtTimeout);
|
||||
COMPARE_FIELD(Angriness);
|
||||
COMPARE_FIELD(TimeLost);
|
||||
|
|
Loading…
Reference in New Issue