mirror of https://github.com/OpenRCT2/OpenRCT2.git
Add "Vandals stopped" stat for security guards (#14071)
* Add a stat for security guards: Vandals stopped * Update src/openrct2-ui/windows/Staff.cpp Co-authored-by: Tulio Leao <tupaschoal@gmail.com> * Update src/openrct2/peep/Guest.cpp Co-authored-by: Tulio Leao <tupaschoal@gmail.com> * No need to update screenCoords at the last line Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com> * Add changelog entry and bump network version * Update to new UI code Co-authored-by: Tulio Leao <tupaschoal@gmail.com> Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>
This commit is contained in:
parent
72b6160b65
commit
4fe5b1dc79
|
@ -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 #
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
0.3.3+ (in development)
|
||||
------------------------------------------------------------------------
|
||||
- Feature: [#14071] “Vandals stopped” statistic for security guards.
|
||||
|
||||
0.3.3 (2021-03-13)
|
||||
------------------------------------------------------------------------
|
||||
|
|
|
@ -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<uint16_t>(peep->StaffVandalsStopped);
|
||||
DrawTextBasic(dpi, screenCoords, STR_STAFF_STAT_VANDALS_STOPPED, ft);
|
||||
break;
|
||||
case StaffType::Entertainer:
|
||||
case StaffType::Count:
|
||||
break;
|
||||
|
|
|
@ -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
|
||||
};
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -700,6 +700,7 @@ struct Peep : SpriteBase
|
|||
{
|
||||
money16 PaidOnFood;
|
||||
uint16_t StaffLitterSwept;
|
||||
uint16_t StaffVandalsStopped;
|
||||
};
|
||||
union
|
||||
{
|
||||
|
|
|
@ -357,6 +357,7 @@ void Staff::ResetStats()
|
|||
peep->StaffGardensWatered = 0;
|
||||
peep->StaffRidesInspected = 0;
|
||||
peep->StaffLitterSwept = 0;
|
||||
peep->StaffVandalsStopped = 0;
|
||||
peep->StaffBinsEmptied = 0;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue