1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-29 09:44:52 +01:00

Move cheats to struct in GameState_t

This commit is contained in:
Duncan
2024-03-03 21:44:15 +00:00
committed by GitHub
parent 4ccecd6e68
commit 4b6ba80a46
76 changed files with 561 additions and 487 deletions

View File

@@ -364,7 +364,7 @@ InteractionInfo ViewportInteractionGetItemRight(const ScreenCoordsXY& screenCoor
else
{
// FIXME: Why does it *2 the value?
if (!gCheatsSandboxMode && !MapIsLocationOwned({ info.Loc, tileElement->GetBaseZ() * 2 }))
if (!GetGameState().Cheats.SandboxMode && !MapIsLocationOwned({ info.Loc, tileElement->GetBaseZ() * 2 }))
{
info.SpriteType = ViewportInteractionItem::None;
return info;
@@ -494,7 +494,7 @@ InteractionInfo ViewportInteractionGetItemRight(const ScreenCoordsXY& screenCoor
return info;
}
case ViewportInteractionItem::ParkEntrance:
if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !gCheatsSandboxMode)
if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !GetGameState().Cheats.SandboxMode)
break;
if (tileElement->GetType() != TileElementType::Entrance)