From cef9417c9f0c9de0ff2f49422481a90a50165ec2 Mon Sep 17 00:00:00 2001 From: Rubidium Date: Tue, 7 May 2024 16:49:04 +0200 Subject: [PATCH] Fix: always allow setting company settings, company/president name/face There is a nice feature that synchronises the client settings upon setting up the company. Before this, those commands would not be executed when no-actions-while-paused is set. This means that, silently and depending on the server configuration, your wished for configuration might not be there. Similarly there is the president's face that's being set while creating a new company and setting of the president/company name upon creation, when no-actions-while-paused is set. So, just allow these operations also while paused to get a uniform experience when joining. To keep the UI somewhat consistent, apply this "freedom" also to the other bits set from the company UI; specifically company name and company colour. --- src/command.cpp | 2 +- src/company_cmd.h | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/command.cpp b/src/command.cpp index 1d6a530b8c..b975c51fbb 100644 --- a/src/command.cpp +++ b/src/command.cpp @@ -151,7 +151,7 @@ bool IsCommandAllowedWhilePaused(Commands cmd) CMDPL_NO_CONSTRUCTION, ///< CMDT_VEHICLE_MANAGEMENT CMDPL_NO_CONSTRUCTION, ///< CMDT_ROUTE_MANAGEMENT CMDPL_NO_CONSTRUCTION, ///< CMDT_OTHER_MANAGEMENT - CMDPL_NO_CONSTRUCTION, ///< CMDT_COMPANY_SETTING + CMDPL_NO_ACTIONS, ///< CMDT_COMPANY_SETTING CMDPL_NO_ACTIONS, ///< CMDT_SERVER_SETTING CMDPL_NO_ACTIONS, ///< CMDT_CHEAT }; diff --git a/src/company_cmd.h b/src/company_cmd.h index 5f818c4b8f..4ee9efc1e9 100644 --- a/src/company_cmd.h +++ b/src/company_cmd.h @@ -28,9 +28,9 @@ CommandCost CmdSetCompanyColour(DoCommandFlag flags, LiveryScheme scheme, bool p DEF_CMD_TRAIT(CMD_COMPANY_CTRL, CmdCompanyCtrl, CMD_SPECTATOR | CMD_CLIENT_ID | CMD_NO_EST, CMDT_SERVER_SETTING) DEF_CMD_TRAIT(CMD_COMPANY_ADD_ALLOW_LIST, CmdCompanyAddAllowList, CMD_NO_EST, CMDT_SERVER_SETTING) DEF_CMD_TRAIT(CMD_GIVE_MONEY, CmdGiveMoney, 0, CMDT_MONEY_MANAGEMENT) -DEF_CMD_TRAIT(CMD_RENAME_COMPANY, CmdRenameCompany, 0, CMDT_OTHER_MANAGEMENT) -DEF_CMD_TRAIT(CMD_RENAME_PRESIDENT, CmdRenamePresident, 0, CMDT_OTHER_MANAGEMENT) -DEF_CMD_TRAIT(CMD_SET_COMPANY_MANAGER_FACE, CmdSetCompanyManagerFace, 0, CMDT_OTHER_MANAGEMENT) -DEF_CMD_TRAIT(CMD_SET_COMPANY_COLOUR, CmdSetCompanyColour, 0, CMDT_OTHER_MANAGEMENT) +DEF_CMD_TRAIT(CMD_RENAME_COMPANY, CmdRenameCompany, 0, CMDT_COMPANY_SETTING) +DEF_CMD_TRAIT(CMD_RENAME_PRESIDENT, CmdRenamePresident, 0, CMDT_COMPANY_SETTING) +DEF_CMD_TRAIT(CMD_SET_COMPANY_MANAGER_FACE, CmdSetCompanyManagerFace, 0, CMDT_COMPANY_SETTING) +DEF_CMD_TRAIT(CMD_SET_COMPANY_COLOUR, CmdSetCompanyColour, 0, CMDT_COMPANY_SETTING) #endif /* COMPANY_CMD_H */