Codechange: Use enum class for command-related enums. (#14775)

This commit is contained in:
Peter Nelson
2025-11-15 19:33:09 +00:00
committed by dP
parent 523635d65e
commit ca744dd7f9
36 changed files with 176 additions and 174 deletions

View File

@@ -27,11 +27,11 @@ CommandCost CmdDecreaseLoan(DoCommandFlags flags, LoanCommand cmd, Money amount)
CommandCost CmdSetCompanyMaxLoan(DoCommandFlags flags, CompanyID company, Money amount);
CommandCost CmdPause(DoCommandFlags flags, PauseMode mode, bool pause);
DEF_CMD_TRAIT(CMD_MONEY_CHEAT, CmdMoneyCheat, CommandFlags({CommandFlag::Offline, CommandFlag::NoEst}), CMDT_CHEAT)
DEF_CMD_TRAIT(CMD_CHANGE_BANK_BALANCE, CmdChangeBankBalance, CommandFlag::Deity, CMDT_MONEY_MANAGEMENT)
DEF_CMD_TRAIT(CMD_INCREASE_LOAN, CmdIncreaseLoan, {}, CMDT_MONEY_MANAGEMENT)
DEF_CMD_TRAIT(CMD_DECREASE_LOAN, CmdDecreaseLoan, {}, CMDT_MONEY_MANAGEMENT)
DEF_CMD_TRAIT(CMD_SET_COMPANY_MAX_LOAN, CmdSetCompanyMaxLoan, CommandFlag::Deity, CMDT_MONEY_MANAGEMENT)
DEF_CMD_TRAIT(CMD_PAUSE, CmdPause, CommandFlags({CommandFlag::Server, CommandFlag::NoEst}), CMDT_SERVER_SETTING)
DEF_CMD_TRAIT(CMD_MONEY_CHEAT, CmdMoneyCheat, CommandFlags({CommandFlag::Offline, CommandFlag::NoEst}), CommandType::Cheat)
DEF_CMD_TRAIT(CMD_CHANGE_BANK_BALANCE, CmdChangeBankBalance, CommandFlag::Deity, CommandType::MoneyManagement)
DEF_CMD_TRAIT(CMD_INCREASE_LOAN, CmdIncreaseLoan, {}, CommandType::MoneyManagement)
DEF_CMD_TRAIT(CMD_DECREASE_LOAN, CmdDecreaseLoan, {}, CommandType::MoneyManagement)
DEF_CMD_TRAIT(CMD_SET_COMPANY_MAX_LOAN, CmdSetCompanyMaxLoan, CommandFlag::Deity, CommandType::MoneyManagement)
DEF_CMD_TRAIT(CMD_PAUSE, CmdPause, CommandFlags({CommandFlag::Server, CommandFlag::NoEst}), CommandType::ServerSetting)
#endif /* MISC_CMD_H */