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

Rename ParkSetEntranceFee to fit naming pattern

This commit is contained in:
Stephan Spengler
2023-01-02 14:42:28 +01:00
committed by Gymnasiast
parent f8ab17749d
commit bfcf66a8f7
12 changed files with 33 additions and 33 deletions

View File

@@ -22,8 +22,8 @@
#include <openrct2/Game.h>
#include <openrct2/GameState.h>
#include <openrct2/Input.h>
#include <openrct2/actions/ParkSetEntranceFeeAction.h>
#include <openrct2/actions/ParkSetNameAction.h>
#include <openrct2/actions/SetParkEntranceFeeAction.h>
#include <openrct2/config/Config.h>
#include <openrct2/localisation/Date.h>
#include <openrct2/localisation/Formatter.h>
@@ -828,14 +828,14 @@ private:
case WIDX_INCREASE_PRICE:
{
const auto newFee = std::min(MAX_ENTRANCE_FEE, gParkEntranceFee + 1.00_GBP);
auto gameAction = SetParkEntranceFeeAction(static_cast<money16>(newFee));
auto gameAction = ParkSetEntranceFeeAction(static_cast<money16>(newFee));
GameActions::Execute(&gameAction);
break;
}
case WIDX_DECREASE_PRICE:
{
const auto newFee = std::max(0.00_GBP, gParkEntranceFee - 1.00_GBP);
auto gameAction = SetParkEntranceFeeAction(static_cast<money16>(newFee));
auto gameAction = ParkSetEntranceFeeAction(static_cast<money16>(newFee));
GameActions::Execute(&gameAction);
break;
}

View File

@@ -101,7 +101,7 @@ enum class GameCommand : int32_t
GuestSetFlags, // GA
SetDate, // GA
Custom, // GA
MapChangeSize,
ChangeMapSize,
FreezeRideRating,
Count,
};

View File

@@ -43,6 +43,7 @@
#include "ParkEntranceRemoveAction.h"
#include "ParkMarketingAction.h"
#include "ParkSetDateAction.h"
#include "ParkSetEntranceFeeAction.h"
#include "ParkSetLoanAction.h"
#include "ParkSetNameAction.h"
#include "ParkSetParameterAction.h"
@@ -65,7 +66,6 @@
#include "RideSetStatusAction.h"
#include "RideSetVehicleAction.h"
#include "ScenarioSetSettingAction.h"
#include "SetParkEntranceFeeAction.h"
#include "SignSetNameAction.h"
#include "SignSetStyleAction.h"
#include "SmallSceneryPlaceAction.h"
@@ -165,7 +165,7 @@ namespace GameActions
REGISTER_ACTION(RideSetVehicleAction);
REGISTER_ACTION(RideSetSettingAction);
REGISTER_ACTION(ScenarioSetSettingAction);
REGISTER_ACTION(SetParkEntranceFeeAction);
REGISTER_ACTION(ParkSetEntranceFeeAction);
REGISTER_ACTION(SignSetNameAction);
REGISTER_ACTION(SignSetStyleAction);
REGISTER_ACTION(StaffFireAction);

View File

@@ -12,7 +12,7 @@
#include "../world/Map.h"
#include "GameAction.h"
class MapChangeSizeAction final : public GameActionBase<GameCommand::MapChangeSize>
class MapChangeSizeAction final : public GameActionBase<GameCommand::ChangeMapSize>
{
public:
MapChangeSizeAction() = default;

View File

@@ -7,7 +7,7 @@
* OpenRCT2 is licensed under the GNU General Public License version 3.
*****************************************************************************/
#include "SetParkEntranceFeeAction.h"
#include "ParkSetEntranceFeeAction.h"
#include "../Cheats.h"
#include "../core/MemoryStream.h"
@@ -15,29 +15,29 @@
#include "../localisation/StringIds.h"
#include "../world/Park.h"
SetParkEntranceFeeAction::SetParkEntranceFeeAction(money16 fee)
ParkSetEntranceFeeAction::ParkSetEntranceFeeAction(money16 fee)
: _fee(fee)
{
}
void SetParkEntranceFeeAction::AcceptParameters(GameActionParameterVisitor& visitor)
void ParkSetEntranceFeeAction::AcceptParameters(GameActionParameterVisitor& visitor)
{
visitor.Visit("value", _fee);
}
uint16_t SetParkEntranceFeeAction::GetActionFlags() const
uint16_t ParkSetEntranceFeeAction::GetActionFlags() const
{
return GameAction::GetActionFlags() | GameActions::Flags::AllowWhilePaused;
}
void SetParkEntranceFeeAction::Serialise(DataSerialiser& stream)
void ParkSetEntranceFeeAction::Serialise(DataSerialiser& stream)
{
GameAction::Serialise(stream);
stream << DS_TAG(_fee);
}
GameActions::Result SetParkEntranceFeeAction::Query() const
GameActions::Result ParkSetEntranceFeeAction::Query() const
{
bool noMoney = (gParkFlags & PARK_FLAGS_NO_MONEY) != 0;
bool forceFreeEntry = !ParkEntranceFeeUnlocked();
@@ -52,7 +52,7 @@ GameActions::Result SetParkEntranceFeeAction::Query() const
return GameActions::Result();
}
GameActions::Result SetParkEntranceFeeAction::Execute() const
GameActions::Result ParkSetEntranceFeeAction::Execute() const
{
gParkEntranceFee = _fee;
window_invalidate_by_class(WindowClass::ParkInformation);

View File

@@ -11,14 +11,14 @@
#include "GameAction.h"
class SetParkEntranceFeeAction final : public GameActionBase<GameCommand::SetParkEntranceFee>
class ParkSetEntranceFeeAction final : public GameActionBase<GameCommand::SetParkEntranceFee>
{
private:
money16 _fee{ MONEY16_UNDEFINED };
public:
SetParkEntranceFeeAction() = default;
SetParkEntranceFeeAction(money16 fee);
ParkSetEntranceFeeAction() = default;
ParkSetEntranceFeeAction(money16 fee);
void AcceptParameters(GameActionParameterVisitor& visitor) override;

View File

@@ -98,6 +98,7 @@
<ClInclude Include="actions\ParkEntranceRemoveAction.h" />
<ClInclude Include="actions\ParkMarketingAction.h" />
<ClInclude Include="actions\ParkSetDateAction.h" />
<ClInclude Include="actions\ParkSetEntranceFeeAction.h" />
<ClInclude Include="actions\ParkSetLoanAction.h" />
<ClInclude Include="actions\ParkSetNameAction.h" />
<ClInclude Include="actions\ParkSetParameterAction.h" />
@@ -121,7 +122,6 @@
<ClInclude Include="actions\RideSetStatusAction.h" />
<ClInclude Include="actions\RideSetVehicleAction.h" />
<ClInclude Include="actions\ScenarioSetSettingAction.h" />
<ClInclude Include="actions\SetParkEntranceFeeAction.h" />
<ClInclude Include="actions\SignSetNameAction.h" />
<ClInclude Include="actions\SignSetStyleAction.h" />
<ClInclude Include="actions\SmallSceneryPlaceAction.h" />
@@ -598,6 +598,7 @@
<ClCompile Include="actions\ParkEntranceRemoveAction.cpp" />
<ClCompile Include="actions\ParkMarketingAction.cpp" />
<ClCompile Include="actions\ParkSetDateAction.cpp" />
<ClCompile Include="actions\ParkSetEntranceFeeAction.cpp" />
<ClCompile Include="actions\ParkSetLoanAction.cpp" />
<ClCompile Include="actions\ParkSetNameAction.cpp" />
<ClCompile Include="actions\ParkSetParameterAction.cpp" />
@@ -621,7 +622,6 @@
<ClCompile Include="actions\RideSetStatusAction.cpp" />
<ClCompile Include="actions\RideSetVehicleAction.cpp" />
<ClCompile Include="actions\ScenarioSetSettingAction.cpp" />
<ClCompile Include="actions\SetParkEntranceFeeAction.cpp" />
<ClCompile Include="actions\SignSetNameAction.cpp" />
<ClCompile Include="actions\SignSetStyleAction.cpp" />
<ClCompile Include="actions\SmallSceneryPlaceAction.cpp" />

View File

@@ -198,7 +198,7 @@ const std::array<NetworkAction, static_cast<size_t>(NetworkPermission::Count)> N
GameCommand::PlaceParkEntrance,
GameCommand::RemoveParkEntrance,
GameCommand::PlacePeepSpawn,
GameCommand::MapChangeSize,
GameCommand::ChangeMapSize,
},
},
NetworkAction{

View File

@@ -1290,7 +1290,7 @@ const static EnumMap<GameCommand> ActionNameToType = {
{ "largesceneryremove", GameCommand::RemoveLargeScenery },
{ "largescenerysetcolour", GameCommand::SetLargeSceneryColour },
{ "loadorquit", GameCommand::LoadOrQuit },
{ "mapChangeSize", GameCommand::MapChangeSize },
{ "mapChangeSize", GameCommand::ChangeMapSize },
{ "mazeplacetrack", GameCommand::PlaceMazeDesign },
{ "mazesettrack", GameCommand::SetMazeTrack },
{ "networkmodifygroup", GameCommand::ModifyGroups },
@@ -1298,6 +1298,7 @@ const static EnumMap<GameCommand> ActionNameToType = {
{ "parkentranceremove", GameCommand::RemoveParkEntrance },
{ "parkmarketing", GameCommand::StartMarketingCampaign },
{ "parksetdate", GameCommand::SetDate },
{ "parksetentrancefee", GameCommand::SetParkEntranceFee },
{ "parksetloan", GameCommand::SetCurrentLoan },
{ "parksetname", GameCommand::SetParkName },
{ "parksetparameter", GameCommand::SetParkOpen },
@@ -1321,7 +1322,6 @@ const static EnumMap<GameCommand> ActionNameToType = {
{ "ridesetvehicle", GameCommand::SetRideVehicles },
{ "scenariosetsetting", GameCommand::EditScenarioOptions },
{ "setcheat", GameCommand::Cheat },
{ "setparkentrancefee", GameCommand::SetParkEntranceFee },
{ "signsetname", GameCommand::SetSignName },
{ "signsetstyle", GameCommand::SetSignStyle },
{ "smallsceneryplace", GameCommand::PlaceScenery },