mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-22 22:34:33 +01:00
Remove no money scenerio flag
This commit is contained in:
@@ -386,7 +386,7 @@ static void WindowEditorObjectiveOptionsShowObjectiveDropdown(rct_window* w)
|
||||
if (i == OBJECTIVE_NONE || i == OBJECTIVE_BUILD_THE_BEST)
|
||||
continue;
|
||||
|
||||
const bool objectiveAllowedByMoneyUsage = !(parkFlags & PARK_FLAGS_NO_MONEY_SCENARIO) || !ObjectiveNeedsMoney(i);
|
||||
const bool objectiveAllowedByMoneyUsage = !(parkFlags & PARK_FLAGS_NO_MONEY) || !ObjectiveNeedsMoney(i);
|
||||
// This objective can only work if the player can ask money for rides.
|
||||
const bool objectiveAllowedByPaymentSettings = (i != OBJECTIVE_MONTHLY_RIDE_INCOME) || park_ride_prices_unlocked();
|
||||
if (objectiveAllowedByMoneyUsage && objectiveAllowedByPaymentSettings)
|
||||
@@ -659,8 +659,7 @@ static void WindowEditorObjectiveOptionsMainUpdate(rct_window* w)
|
||||
objectiveType = gScenarioObjective.Type;
|
||||
|
||||
// Check if objective is allowed by money and pay-per-ride settings.
|
||||
const bool objectiveAllowedByMoneyUsage = !(parkFlags & PARK_FLAGS_NO_MONEY_SCENARIO)
|
||||
|| !ObjectiveNeedsMoney(objectiveType);
|
||||
const bool objectiveAllowedByMoneyUsage = !(parkFlags & PARK_FLAGS_NO_MONEY) || !ObjectiveNeedsMoney(objectiveType);
|
||||
// This objective can only work if the player can ask money for rides.
|
||||
const bool objectiveAllowedByPaymentSettings = (objectiveType != OBJECTIVE_MONTHLY_RIDE_INCOME)
|
||||
|| park_ride_prices_unlocked();
|
||||
|
||||
@@ -387,17 +387,7 @@ static void WindowEditorScenarioOptionsFinancialMouseup(rct_window* w, rct_widge
|
||||
break;
|
||||
case WIDX_NO_MONEY:
|
||||
{
|
||||
int32_t newMoneySetting;
|
||||
|
||||
if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR)
|
||||
{
|
||||
newMoneySetting = (gParkFlags & PARK_FLAGS_NO_MONEY_SCENARIO) ? 0 : 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
newMoneySetting = (gParkFlags & PARK_FLAGS_NO_MONEY) ? 0 : 1;
|
||||
}
|
||||
|
||||
auto newMoneySetting = (gParkFlags & PARK_FLAGS_NO_MONEY) ? 0 : 1;
|
||||
auto scenarioSetSetting = ScenarioSetSettingAction(ScenarioSetSetting::NoMoney, newMoneySetting);
|
||||
GameActions::Execute(&scenarioSetSetting);
|
||||
w->Invalidate();
|
||||
@@ -583,8 +573,7 @@ static void WindowEditorScenarioOptionsFinancialInvalidate(rct_window* w)
|
||||
|
||||
WindowEditorScenarioOptionsSetPressedTab(w);
|
||||
|
||||
if (((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && (gParkFlags & PARK_FLAGS_NO_MONEY_SCENARIO))
|
||||
|| (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && (gParkFlags & PARK_FLAGS_NO_MONEY)))
|
||||
if (gParkFlags & PARK_FLAGS_NO_MONEY)
|
||||
{
|
||||
w->pressed_widgets |= (1ULL << WIDX_NO_MONEY);
|
||||
for (int32_t i = WIDX_INITIAL_CASH; i <= WIDX_FORBID_MARKETING; i++)
|
||||
@@ -871,8 +860,7 @@ static void WindowEditorScenarioOptionsGuestsInvalidate(rct_window* w)
|
||||
|
||||
WindowEditorScenarioOptionsSetPressedTab(w);
|
||||
|
||||
if (((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && (gParkFlags & PARK_FLAGS_NO_MONEY_SCENARIO))
|
||||
|| (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && (gParkFlags & PARK_FLAGS_NO_MONEY)))
|
||||
if (gParkFlags & PARK_FLAGS_NO_MONEY)
|
||||
{
|
||||
w->widgets[WIDX_CASH_PER_GUEST].type = WindowWidgetType::Empty;
|
||||
w->widgets[WIDX_CASH_PER_GUEST_INCREASE].type = WindowWidgetType::Empty;
|
||||
@@ -1207,8 +1195,7 @@ static void WindowEditorScenarioOptionsParkInvalidate(rct_window* w)
|
||||
|
||||
WindowEditorScenarioOptionsSetPressedTab(w);
|
||||
|
||||
if (((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && (gParkFlags & PARK_FLAGS_NO_MONEY_SCENARIO))
|
||||
|| (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && (gParkFlags & PARK_FLAGS_NO_MONEY)))
|
||||
if (gParkFlags & PARK_FLAGS_NO_MONEY)
|
||||
{
|
||||
for (int32_t i = WIDX_LAND_COST; i <= WIDX_ENTRY_PRICE_DECREASE; i++)
|
||||
w->widgets[i].type = WindowWidgetType::Empty;
|
||||
|
||||
@@ -344,14 +344,6 @@ namespace Editor
|
||||
gGuestChangeModifier = 0;
|
||||
if (fromSave)
|
||||
{
|
||||
if (gParkFlags & PARK_FLAGS_NO_MONEY)
|
||||
{
|
||||
gParkFlags |= PARK_FLAGS_NO_MONEY_SCENARIO;
|
||||
}
|
||||
else
|
||||
{
|
||||
gParkFlags &= ~PARK_FLAGS_NO_MONEY_SCENARIO;
|
||||
}
|
||||
gParkFlags |= PARK_FLAGS_NO_MONEY;
|
||||
|
||||
if (gParkEntranceFee == 0)
|
||||
|
||||
@@ -46,11 +46,11 @@ GameActions::Result ScenarioSetSettingAction::Execute() const
|
||||
{
|
||||
if (_value != 0)
|
||||
{
|
||||
gParkFlags |= PARK_FLAGS_NO_MONEY_SCENARIO;
|
||||
gParkFlags |= PARK_FLAGS_NO_MONEY;
|
||||
}
|
||||
else
|
||||
{
|
||||
gParkFlags &= ~PARK_FLAGS_NO_MONEY_SCENARIO;
|
||||
gParkFlags &= ~PARK_FLAGS_NO_MONEY;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -2206,11 +2206,9 @@ namespace RCT1
|
||||
gParkFlags |= PARK_FLAGS_UNLOCK_ALL_PRICES;
|
||||
}
|
||||
|
||||
// RCT2 uses two flags for no money (due to the scenario editor). RCT1 used only one.
|
||||
// Copy its value to make no money scenarios such as Arid Heights work properly.
|
||||
if (_s4.park_flags & RCT1_PARK_FLAGS_NO_MONEY)
|
||||
{
|
||||
gParkFlags |= PARK_FLAGS_NO_MONEY_SCENARIO;
|
||||
gParkFlags |= PARK_FLAGS_NO_MONEY;
|
||||
}
|
||||
|
||||
gParkSize = _s4.park_size;
|
||||
|
||||
@@ -252,7 +252,15 @@ namespace RCT2
|
||||
|
||||
gInitialCash = ToMoney64(_s6.initial_cash);
|
||||
gBankLoan = ToMoney64(_s6.current_loan);
|
||||
gParkFlags = _s6.park_flags;
|
||||
|
||||
gParkFlags = _s6.park_flags & ~PARK_FLAGS_NO_MONEY_SCENARIO;
|
||||
|
||||
// RCT2 used a different flag for `no money` when the park is a scenario
|
||||
if (_s6.header.type == S6_TYPE_SCENARIO && (_s6.park_flags & PARK_FLAGS_NO_MONEY_SCENARIO))
|
||||
gParkFlags |= PARK_FLAGS_NO_MONEY;
|
||||
else
|
||||
gParkFlags &= ~PARK_FLAGS_NO_MONEY;
|
||||
|
||||
gParkEntranceFee = _s6.park_entrance_fee;
|
||||
// rct1_park_entrance_x
|
||||
// rct1_park_entrance_y
|
||||
|
||||
@@ -105,9 +105,6 @@ void scenario_reset()
|
||||
Random::Rct2::Seed s{ 0x1234567F ^ Platform::GetTicks(), 0x789FABCD ^ Platform::GetTicks() };
|
||||
gScenarioRand.seed(s);
|
||||
|
||||
gParkFlags &= ~PARK_FLAGS_NO_MONEY;
|
||||
if (gParkFlags & PARK_FLAGS_NO_MONEY_SCENARIO)
|
||||
gParkFlags |= PARK_FLAGS_NO_MONEY;
|
||||
research_reset_current_item();
|
||||
scenery_set_default_placement_configuration();
|
||||
News::InitQueue();
|
||||
|
||||
@@ -41,7 +41,6 @@ namespace OpenRCT2::Scripting
|
||||
{ "difficultGuestGeneration", PARK_FLAGS_DIFFICULT_GUEST_GENERATION },
|
||||
{ "freeParkEntry", PARK_FLAGS_PARK_FREE_ENTRY },
|
||||
{ "difficultParkRating", PARK_FLAGS_DIFFICULT_PARK_RATING },
|
||||
{ "noMoney", PARK_FLAGS_NO_MONEY_SCENARIO },
|
||||
{ "unlockAllPrices", PARK_FLAGS_UNLOCK_ALL_PRICES },
|
||||
});
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ enum : uint32_t
|
||||
PARK_FLAGS_PARK_FREE_ENTRY = (1 << 13),
|
||||
PARK_FLAGS_DIFFICULT_PARK_RATING = (1 << 14),
|
||||
PARK_FLAGS_LOCK_REAL_NAMES_OPTION_DEPRECATED = (1 << 15), // Deprecated now we use a persistent 'real names' setting
|
||||
PARK_FLAGS_NO_MONEY_SCENARIO = (1 << 17), // equivalent to PARK_FLAGS_NO_MONEY, but used in scenario editor
|
||||
PARK_FLAGS_NO_MONEY_SCENARIO = (1 << 17), // Deprecated, originally used in scenario editor
|
||||
PARK_FLAGS_SPRITES_INITIALISED = (1 << 18), // After a scenario is loaded this prevents edits in the scenario editor
|
||||
PARK_FLAGS_SIX_FLAGS_DEPRECATED = (1 << 19), // Not used anymore
|
||||
PARK_FLAGS_UNLOCK_ALL_PRICES = (1u << 31), // OpenRCT2 only!
|
||||
|
||||
Reference in New Issue
Block a user