OpenTTD Source 20241224-master-gf74b0cf984
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
17enum ClientID : uint32_t;
18enum Colours : uint8_t;
19
21CommandCost CmdCompanyAllowListCtrl(DoCommandFlag flags, CompanyAllowListCtrlAction action, const std::string &public_key);
22CommandCost CmdGiveMoney(DoCommandFlag flags, Money money, CompanyID dest_company);
23CommandCost CmdRenameCompany(DoCommandFlag flags, const std::string &text);
24CommandCost CmdRenamePresident(DoCommandFlag flags, const std::string &text);
26CommandCost CmdSetCompanyColour(DoCommandFlag flags, LiveryScheme scheme, bool primary, Colours colour);
27
35
36#endif /* COMPANY_CMD_H */
Common return value for all commands.
Types related to commands.
@ CMDT_COMPANY_SETTING
Changing settings related to a company.
@ CMDT_MONEY_MANAGEMENT
Management of money, i.e. loans.
@ CMDT_SERVER_SETTING
Pausing/removing companies/server settings.
DoCommandFlag
List of flags for a command.
@ CMD_COMPANY_CTRL
used in multiplayer to create a new companies etc.
@ CMD_RENAME_COMPANY
change the company name
@ CMD_SET_COMPANY_MANAGER_FACE
set the manager's face of the company
@ CMD_GIVE_MONEY
give money to another company
@ CMD_RENAME_PRESIDENT
change the president name
@ CMD_COMPANY_ALLOW_LIST_CTRL
Used in multiplayer to add/remove a client's public key to/from the company's allow list.
@ CMD_SET_COMPANY_COLOUR
set the colour of the company
@ CMD_NO_EST
the command is never estimated.
@ CMD_SPECTATOR
the command may be initiated by a spectator
@ CMD_CLIENT_ID
set p2 with the ClientID of the sending client.
CommandCost CmdSetCompanyColour(DoCommandFlag flags, LiveryScheme scheme, bool primary, Colours colour)
Change the company's company-colour.
CommandCost CmdCompanyCtrl(DoCommandFlag flags, CompanyCtrlAction cca, CompanyID company_id, CompanyRemoveReason reason, ClientID client_id)
Control the companies: add, delete, etc.
CommandCost CmdSetCompanyManagerFace(DoCommandFlag flags, CompanyManagerFace cmf)
Change the company manager's face.
CommandCost CmdGiveMoney(DoCommandFlag flags, Money money, CompanyID dest_company)
Transfer funds (money) from one company to another.
CommandCost CmdRenamePresident(DoCommandFlag flags, const std::string &text)
Change the name of the president.
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.
CommandCost CmdRenameCompany(DoCommandFlag flags, const std::string &text)
Change the name of the company.
Types related to companies.
CompanyCtrlAction
The action to do with CMD_COMPANY_CTRL.
CompanyAllowListCtrlAction
The action to do with CMD_COMPANY_ALLOW_LIST_CTRL.
uint32_t CompanyManagerFace
Company manager face bits, info see in company_manager_face.h.
Owner
Enum for all companies/owners.
CompanyRemoveReason
The reason why the company was removed.
Functions/types related to livery colours.
LiveryScheme
List of different livery schemes.
Definition livery.h:21
ClientID
'Unique' identifier to be given to clients