1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-27 00:34:46 +01:00

#21193: Move gParkEntranceFee to GameState_t (#21256)

This commit is contained in:
Hielke Morsink
2024-01-24 13:45:01 +01:00
committed by GitHub
parent b200ce02ef
commit fb420f6516
14 changed files with 33 additions and 30 deletions

View File

@@ -118,15 +118,16 @@ namespace OpenRCT2::Scripting
money64 ScPark::entranceFee_get() const
{
return gParkEntranceFee;
return GetGameState().ParkEntranceFee;
}
void ScPark::entranceFee_set(money64 value)
{
ThrowIfGameStateNotMutable();
if (gParkEntranceFee != value)
auto& gameState = GetGameState();
if (gameState.ParkEntranceFee != value)
{
gParkEntranceFee = value;
gameState.ParkEntranceFee = value;
WindowInvalidateByClass(WindowClass::ParkInformation);
}
}