1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-28 09:14:58 +01:00

#21193: Move gParkFlags to GameState_t, refactor uses

Also changed a few instances where GetGameState was called inside the same function.
The change in Peep.cpp is needed because of a function conflict. FormatStringID exists both in the global and in the OpenRCT2 namespace.
This commit is contained in:
Hielke Morsink
2024-01-22 16:03:39 +01:00
parent 8e88f464b3
commit 13351d996e
60 changed files with 366 additions and 242 deletions

View File

@@ -14,6 +14,7 @@
#include <openrct2/Cheats.h>
#include <openrct2/Context.h>
#include <openrct2/Game.h>
#include <openrct2/GameState.h>
#include <openrct2/Input.h>
#include <openrct2/actions/TrackDesignAction.h>
#include <openrct2/audio/audio.h>
@@ -304,7 +305,7 @@ public:
}
// Price
if (_placementCost != MONEY64_UNDEFINED && !(gParkFlags & PARK_FLAGS_NO_MONEY))
if (_placementCost != MONEY64_UNDEFINED && !(GetGameState().ParkFlags & PARK_FLAGS_NO_MONEY))
{
ft = Formatter();
ft.Add<money64>(_placementCost);