mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-27 16:54:52 +01:00
Add a new warning for queue length complaints
This commit is contained in:
@@ -3676,6 +3676,7 @@ STR_6484 :See-Through vegetation toggle
|
||||
STR_6485 :See-Through vehicles toggle
|
||||
STR_6486 :See-Through guests toggle
|
||||
STR_6487 :See-Through staff toggle
|
||||
STR_6488 :{RED}Guests are complaining about the length of the queues in your park.{NEWLINE}Consider shortening problematic queues, or increase the ride’s throughput.
|
||||
|
||||
#############
|
||||
# Scenarios #
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
- Improved: [#16408] Improve --version cli option to report more compatibility information.
|
||||
- Improved: [#16740] Allow staff patrol areas to be defined with individual tiles rather than groups of 4x4.
|
||||
- Improved: [#16764] [Plugin] Add hook 'map.save', called before the map is about is saved.
|
||||
- Improved: [#16925] The queue length of 1000 guests is lifted, and a warning for too long queues is added instead.
|
||||
- Change: [#14484] Make the Heartline Twister coaster ratings a little bit less hateful.
|
||||
- Change: [#16077] When importing SV6 files, the RCT1 land types are only added when they were actually used.
|
||||
- Change: [#16424] Following an entity in the title sequence no longer toggles underground view when it's underground.
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#define PEEP_VANDALISM_WARNING_THRESHOLD 15
|
||||
#define PEEP_NOEXIT_WARNING_THRESHOLD 8
|
||||
#define PEEP_LOST_WARNING_THRESHOLD 8
|
||||
#define PEEP_TOO_LONG_QUEUE_THRESHOLD 25
|
||||
|
||||
#define PEEP_MAX_HAPPINESS 255
|
||||
#define PEEP_MAX_HUNGER 255
|
||||
|
||||
@@ -1012,9 +1012,19 @@ void peep_problem_warnings_update()
|
||||
disgust_counter = 0, toilet_counter = 0, vandalism_counter = 0;
|
||||
uint8_t* warning_throttle = gPeepWarningThrottle;
|
||||
|
||||
int32_t inQueueCounter = 0;
|
||||
int32_t tooLongQueueCounter = 0;
|
||||
std::map<RideId, int32_t> queueComplainingGuestsMap;
|
||||
|
||||
for (auto peep : EntityList<Guest>())
|
||||
{
|
||||
if (peep->OutsideOfPark || peep->Thoughts[0].freshness > 5)
|
||||
if (peep->OutsideOfPark)
|
||||
continue;
|
||||
|
||||
if (peep->State == PeepState::Queuing || peep->State == PeepState::QueuingFront)
|
||||
inQueueCounter++;
|
||||
|
||||
if (peep->Thoughts[0].freshness > 5)
|
||||
continue;
|
||||
|
||||
switch (peep->Thoughts[0].type)
|
||||
@@ -1068,6 +1078,10 @@ void peep_problem_warnings_update()
|
||||
case PeepThoughtType::Vandalism: // 0x21
|
||||
vandalism_counter++;
|
||||
break;
|
||||
case PeepThoughtType::QueuingAges:
|
||||
tooLongQueueCounter++;
|
||||
queueComplainingGuestsMap[peep->Thoughts[0].rideId]++;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -1157,6 +1171,22 @@ void peep_problem_warnings_update()
|
||||
News::AddItemToQueue(News::ItemType::Peeps, STR_PEEPS_GETTING_LOST_OR_STUCK, 16, {});
|
||||
}
|
||||
}
|
||||
|
||||
if (warning_throttle[7])
|
||||
--warning_throttle[7];
|
||||
else if (tooLongQueueCounter > PEEP_TOO_LONG_QUEUE_THRESHOLD && tooLongQueueCounter > inQueueCounter / 20)
|
||||
{ // The amount of guests complaining about queue duration is at least 5% of the amount of queuing guests.
|
||||
// This includes guests who are no longer queuing.
|
||||
warning_throttle[7] = 4;
|
||||
if (gConfigNotifications.guest_warnings)
|
||||
{
|
||||
auto rideWithMostQueueComplaints = std::max_element(
|
||||
queueComplainingGuestsMap.begin(), queueComplainingGuestsMap.end(),
|
||||
[](auto& lhs, auto& rhs) { return lhs.second < rhs.second; });
|
||||
auto rideId = rideWithMostQueueComplaints->first.ToUnderlying();
|
||||
News::AddItemToQueue(News::ItemType::Ride, STR_PEEPS_COMPLAINING_ABOUT_QUEUE_LENGTH_WARNING, rideId, {});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void peep_stop_crowd_noise()
|
||||
|
||||
@@ -3946,6 +3946,8 @@ enum : uint16_t
|
||||
STR_SHORTCUT_SEE_THROUGH_GUESTS_TOGGLE = 6486,
|
||||
STR_SHORTCUT_SEE_THROUGH_STAFF_TOGGLE = 6487,
|
||||
|
||||
STR_PEEPS_COMPLAINING_ABOUT_QUEUE_LENGTH_WARNING = 6488,
|
||||
|
||||
// Have to include resource strings (from scenarios and objects) for the time being now that language is partially working
|
||||
/* MAX_STR_COUNT = 32768 */ // MAX_STR_COUNT - upper limit for number of strings, not the current count strings
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user