OpenTTD Source  20240917-master-g9ab0a47812
company_cmd.h
Go to the documentation of this file.
1 /*
2  * This file is part of OpenTTD.
3  * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
4  * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
5  * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
6  */
7 
10 #ifndef COMPANY_CMD_H
11 #define COMPANY_CMD_H
12 
13 #include "command_type.h"
14 #include "company_type.h"
15 #include "livery.h"
16 
17 enum ClientID : uint32_t;
18 enum Colours : uint8_t;
19 
21 CommandCost CmdCompanyAllowListCtrl(DoCommandFlag flags, CompanyAllowListCtrlAction action, const std::string &public_key);
22 CommandCost CmdGiveMoney(DoCommandFlag flags, Money money, CompanyID dest_company);
23 CommandCost CmdRenameCompany(DoCommandFlag flags, const std::string &text);
24 CommandCost CmdRenamePresident(DoCommandFlag flags, const std::string &text);
26 CommandCost CmdSetCompanyColour(DoCommandFlag flags, LiveryScheme scheme, bool primary, Colours colour);
27 
35 
36 #endif /* COMPANY_CMD_H */
CMD_RENAME_COMPANY
@ CMD_RENAME_COMPANY
change the company name
Definition: command_type.h:266
CmdRenamePresident
CommandCost CmdRenamePresident(DoCommandFlag flags, const std::string &text)
Change the name of the president.
Definition: company_cmd.cpp:1212
CMD_COMPANY_CTRL
@ CMD_COMPANY_CTRL
used in multiplayer to create a new companies etc.
Definition: command_type.h:300
Owner
Owner
Enum for all companies/owners.
Definition: company_type.h:18
CmdGiveMoney
CommandCost CmdGiveMoney(DoCommandFlag flags, Money money, CompanyID dest_company)
Transfer funds (money) from one company to another.
Definition: company_cmd.cpp:1296
CMD_NO_EST
@ CMD_NO_EST
the command is never estimated.
Definition: command_type.h:407
CMD_GIVE_MONEY
@ CMD_GIVE_MONEY
give money to another company
Definition: command_type.h:329
CMD_COMPANY_ALLOW_LIST_CTRL
@ CMD_COMPANY_ALLOW_LIST_CTRL
Used in multiplayer to add/remove a client's public key to/from the company's allow list.
Definition: command_type.h:301
CmdSetCompanyColour
CommandCost CmdSetCompanyColour(DoCommandFlag flags, LiveryScheme scheme, bool primary, Colours colour)
Change the company's company-colour.
Definition: company_cmd.cpp:1070
CMDT_COMPANY_SETTING
@ CMDT_COMPANY_SETTING
Changing settings related to a company.
Definition: command_type.h:420
CMD_RENAME_PRESIDENT
@ CMD_RENAME_PRESIDENT
change the president name
Definition: command_type.h:267
CmdRenameCompany
CommandCost CmdRenameCompany(DoCommandFlag flags, const std::string &text)
Change the name of the company.
Definition: company_cmd.cpp:1169
DoCommandFlag
DoCommandFlag
List of flags for a command.
Definition: command_type.h:374
CommandCost
Common return value for all commands.
Definition: command_type.h:23
CmdCompanyCtrl
enum ClientID uint32_t enum Colours uint8_t CommandCost CmdCompanyCtrl(DoCommandFlag flags, CompanyCtrlAction cca, CompanyID company_id, CompanyRemoveReason reason, ClientID client_id)
Control the companies: add, delete, etc.
Definition: company_cmd.cpp:864
LiveryScheme
LiveryScheme
List of different livery schemes.
Definition: livery.h:21
CompanyAllowListCtrlAction
CompanyAllowListCtrlAction
The action to do with CMD_COMPANY_ALLOW_LIST_CTRL.
Definition: company_type.h:76
CMD_CLIENT_ID
@ CMD_CLIENT_ID
set p2 with the ClientID of the sending client.
Definition: command_type.h:404
CompanyManagerFace
uint32_t CompanyManagerFace
Company manager face bits, info see in company_manager_face.h.
Definition: company_type.h:52
livery.h
CMD_SET_COMPANY_COLOUR
@ CMD_SET_COMPANY_COLOUR
set the colour of the company
Definition: command_type.h:255
command_type.h
CMD_SET_COMPANY_MANAGER_FACE
@ CMD_SET_COMPANY_MANAGER_FACE
set the manager's face of the company
Definition: command_type.h:254
ClientID
ClientID
'Unique' identifier to be given to clients
Definition: network_type.h:49
CMDT_SERVER_SETTING
@ CMDT_SERVER_SETTING
Pausing/removing companies/server settings.
Definition: command_type.h:421
CompanyCtrlAction
CompanyCtrlAction
The action to do with CMD_COMPANY_CTRL.
Definition: company_type.h:67
OverflowSafeInt< int64_t >
CMD_SPECTATOR
@ CMD_SPECTATOR
the command may be initiated by a spectator
Definition: command_type.h:398
CmdCompanyAllowListCtrl
CommandCost CmdCompanyAllowListCtrl(DoCommandFlag flags, CompanyAllowListCtrlAction action, const std::string &public_key)
Add or remove the given public key to the allow list of this company.
Definition: company_cmd.cpp:1004
company_type.h
CMDT_MONEY_MANAGEMENT
@ CMDT_MONEY_MANAGEMENT
Management of money, i.e. loans.
Definition: command_type.h:416
CmdSetCompanyManagerFace
CommandCost CmdSetCompanyManagerFace(DoCommandFlag flags, CompanyManagerFace cmf)
Change the company manager's face.
Definition: company_cmd.cpp:1037
CompanyRemoveReason
CompanyRemoveReason
The reason why the company was removed.
Definition: company_type.h:56