forked from rosebudai/OpenRCT2-Web
Move .samePriceThroughoutPark into ParkData struct
This commit is contained in:
1 parent
e300ca8277
commit
1c361dd508
8 files changed
+9
-9
No files matched your search
@@ -6235,7 +6235,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
static void UpdateSamePriceThroughoutFlags(ShopItem shop_item)
|
||||
{
|
||||
const auto& gameState = getGameState();
|
||||
const auto existingFlags = gameState.samePriceThroughoutPark;
|
||||
const auto existingFlags = gameState.park.samePriceThroughoutPark;
|
||||
|
||||
auto newFlags = existingFlags;
|
||||
if (GetShopItemDescriptor(shop_item).IsPhoto())
|
||||
|
||||
@@ -94,8 +94,6 @@ namespace OpenRCT2
|
||||
uint16_t grassSceneryTileLoopPosition;
|
||||
CoordsXY widePathTileLoopPosition;
|
||||
|
||||
uint64_t samePriceThroughoutPark{};
|
||||
|
||||
uint8_t researchFundingLevel;
|
||||
uint8_t researchPriorities;
|
||||
uint16_t researchProgress;
|
||||
|
||||
@@ -77,7 +77,7 @@ GameActions::Result ParkSetParameterAction::Execute() const
|
||||
}
|
||||
break;
|
||||
case ParkParameter::SamePriceInPark:
|
||||
gameState.samePriceThroughoutPark = _value;
|
||||
gameState.park.samePriceThroughoutPark = _value;
|
||||
windowMgr->InvalidateByClass(WindowClass::Ride);
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -912,7 +912,7 @@ namespace OpenRCT2
|
||||
cs.ReadWrite(gameState.park.staffHandymanColour);
|
||||
cs.ReadWrite(gameState.park.staffMechanicColour);
|
||||
cs.ReadWrite(gameState.park.staffSecurityColour);
|
||||
cs.ReadWrite(gameState.samePriceThroughoutPark);
|
||||
cs.ReadWrite(gameState.park.samePriceThroughoutPark);
|
||||
|
||||
// Finances
|
||||
if (cs.GetMode() == OrcaStream::Mode::READING)
|
||||
|
||||
@@ -2334,10 +2334,10 @@ namespace OpenRCT2::RCT1
|
||||
|
||||
gameState.park.Size = _s4.ParkSize;
|
||||
gameState.totalRideValueForMoney = _s4.TotalRideValueForMoney;
|
||||
gameState.samePriceThroughoutPark = 0;
|
||||
gameState.park.samePriceThroughoutPark = 0;
|
||||
if (_gameVersion == FILE_VERSION_RCT1_LL)
|
||||
{
|
||||
gameState.samePriceThroughoutPark = _s4.SamePriceThroughout;
|
||||
gameState.park.samePriceThroughoutPark = _s4.SamePriceThroughout;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -527,7 +527,7 @@ namespace OpenRCT2::RCT2
|
||||
// Pad013587FC
|
||||
gameState.park.RatingCasualtyPenalty = _s6.ParkRatingCasualtyPenalty;
|
||||
gameState.mapSize = { _s6.MapSize, _s6.MapSize };
|
||||
gameState.samePriceThroughoutPark = _s6.SamePriceThroughout
|
||||
gameState.park.samePriceThroughoutPark = _s6.SamePriceThroughout
|
||||
| (static_cast<uint64_t>(_s6.SamePriceThroughoutExtended) << 32);
|
||||
gameState.suggestedGuestMaximum = _s6.SuggestedMaxGuests;
|
||||
gameState.scenarioParkRatingWarningDays = _s6.ParkRatingWarningDays;
|
||||
|
||||
@@ -147,7 +147,7 @@ money64 ShopItemGetCommonPrice(Ride* forRide, const ShopItem shopItem)
|
||||
|
||||
bool ShopItemHasCommonPrice(const ShopItem shopItem)
|
||||
{
|
||||
return (getGameState().samePriceThroughoutPark & EnumToFlag(shopItem)) != 0;
|
||||
return (getGameState().park.samePriceThroughoutPark & EnumToFlag(shopItem)) != 0;
|
||||
}
|
||||
|
||||
bool ShopItemDescriptor::IsFood() const
|
||||
|
||||
@@ -91,6 +91,8 @@ namespace OpenRCT2::Park
|
||||
money64 bankLoan;
|
||||
money64 maxBankLoan;
|
||||
|
||||
uint64_t samePriceThroughoutPark{};
|
||||
|
||||
colour_t staffHandymanColour;
|
||||
colour_t staffMechanicColour;
|
||||
colour_t staffSecurityColour;
|
||||
|
||||
Reference in new issue
Block a user