Fix #11275: Crashes that kill only 1 peep create grammatically incorrect messages (#11278)

Fix #11275: Crashes that kill only 1 peep create grammatically incorrect messages (#11278)

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
This commit is contained in:
Michael Stowe 2020-04-16 20:04:12 -04:00 committed by GitHub
parent 4a81219521
commit 163119ea3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 0 deletions

View File

@ -3677,6 +3677,7 @@ STR_6360 :{SMALLFONT}{BLACK}{COMMA32}
STR_6361 :Enable lighting effects on rides (experimental)
STR_6362 :{SMALLFONT}{BLACK}If enabled, vehicles for tracked rides will be lit up at night.
STR_6363 :Copied text to clipboard
STR_6364 :{RED}{COMMA16} person has died in an accident on {STRINGID}
STR_6464 :Ride casualties
STR_6465 :Stuck or stalled vehicles

View File

@ -3911,6 +3911,8 @@ enum
STR_COPY_INPUT_TO_CLIPBOARD = 6363,
STR_X_PERSON_DIED_ON_X = 6364,
STR_NOTIFICATION_RIDE_CASUALTIES = 6464,
STR_NOTIFICATION_RIDE_VEHICLE_STALLED = 6465,

View File

@ -5209,6 +5209,9 @@ static void vehicle_kill_all_passengers(Vehicle* vehicle)
if (numFatalities != 0)
{
ride->FormatNameTo(gCommonFormatArgs + 2);
news_item_add_to_queue(
NEWS_ITEM_RIDE, numFatalities == 1 ? STR_X_PERSON_DIED_ON_X : STR_X_PEOPLE_DIED_ON_X, vehicle->ride);
if (gConfigNotifications.ride_casualties)
{
ride->FormatNameTo(gCommonFormatArgs + 2);