diff --git a/data/language/en-GB.txt b/data/language/en-GB.txt index d871161682..3010e8fa72 100644 --- a/data/language/en-GB.txt +++ b/data/language/en-GB.txt @@ -3679,6 +3679,7 @@ STR_6431 :RMB STR_6432 :Mouse {INT32} STR_6433 :Remove STR_6434 :Remove all bindings for this shortcut. +STR_6435 :{WINDOW_COLOUR_2}Vandals stopped: {BLACK}{COMMA16} ############# # Scenarios # diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 882079f4c0..9e99c4a873 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -1,5 +1,6 @@ 0.3.3+ (in development) ------------------------------------------------------------------------ +- Feature: [#14071] “Vandals stopped” statistic for security guards. 0.3.3 (2021-03-13) ------------------------------------------------------------------------ diff --git a/src/openrct2-ui/windows/Staff.cpp b/src/openrct2-ui/windows/Staff.cpp index 74aca4b496..5651e944f7 100644 --- a/src/openrct2-ui/windows/Staff.cpp +++ b/src/openrct2-ui/windows/Staff.cpp @@ -1139,6 +1139,10 @@ void window_staff_stats_paint(rct_window* w, rct_drawpixelinfo* dpi) DrawTextBasic(dpi, screenCoords, STR_STAFF_STAT_RIDES_FIXED, ft); break; case StaffType::Security: + ft = Formatter(); + ft.Add(peep->StaffVandalsStopped); + DrawTextBasic(dpi, screenCoords, STR_STAFF_STAT_VANDALS_STOPPED, ft); + break; case StaffType::Entertainer: case StaffType::Count: break; diff --git a/src/openrct2/localisation/StringIds.h b/src/openrct2/localisation/StringIds.h index 381637c278..35bc84bb85 100644 --- a/src/openrct2/localisation/StringIds.h +++ b/src/openrct2/localisation/StringIds.h @@ -3936,6 +3936,8 @@ enum STR_SHORTCUT_REMOVE = 6433, STR_SHORTCUT_REMOVE_TIP = 6434, + STR_STAFF_STAT_VANDALS_STOPPED = 6435, + // 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 }; diff --git a/src/openrct2/network/NetworkBase.cpp b/src/openrct2/network/NetworkBase.cpp index dfa6893fb1..c2f48ebe7a 100644 --- a/src/openrct2/network/NetworkBase.cpp +++ b/src/openrct2/network/NetworkBase.cpp @@ -36,7 +36,7 @@ // This string specifies which version of network stream current build uses. // It is used for making sure only compatible builds get connected, even within // single OpenRCT2 version. -#define NETWORK_STREAM_VERSION "0" +#define NETWORK_STREAM_VERSION "1" #define NETWORK_STREAM_ID OPENRCT2_VERSION "-" NETWORK_STREAM_VERSION static Peep* _pickup_peep = nullptr; diff --git a/src/openrct2/peep/Guest.cpp b/src/openrct2/peep/Guest.cpp index a370acec78..826198e2ac 100644 --- a/src/openrct2/peep/Guest.cpp +++ b/src/openrct2/peep/Guest.cpp @@ -5903,7 +5903,10 @@ static void peep_update_walking_break_scenery(Peep* peep) int32_t y_diff = abs(inner_peep->y - peep->y); if (std::max(x_diff, y_diff) < 224) + { + inner_peep->StaffVandalsStopped++; return; + } } tileElement->SetIsBroken(true); diff --git a/src/openrct2/peep/Peep.h b/src/openrct2/peep/Peep.h index 0feb0e1250..5f43f0b2b3 100644 --- a/src/openrct2/peep/Peep.h +++ b/src/openrct2/peep/Peep.h @@ -700,6 +700,7 @@ struct Peep : SpriteBase { money16 PaidOnFood; uint16_t StaffLitterSwept; + uint16_t StaffVandalsStopped; }; union { diff --git a/src/openrct2/peep/Staff.cpp b/src/openrct2/peep/Staff.cpp index 735effbf5e..6144d63794 100644 --- a/src/openrct2/peep/Staff.cpp +++ b/src/openrct2/peep/Staff.cpp @@ -357,6 +357,7 @@ void Staff::ResetStats() peep->StaffGardensWatered = 0; peep->StaffRidesInspected = 0; peep->StaffLitterSwept = 0; + peep->StaffVandalsStopped = 0; peep->StaffBinsEmptied = 0; } }