OpenTTD Source 20241224-master-gf74b0cf984
misc_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 MISC_CMD_H
11#define MISC_CMD_H
12
13#include "command_type.h"
14#include "economy_type.h"
15
16enum PauseMode : uint8_t;
17
18enum class LoanCommand : uint8_t {
19 Interval,
20 Max,
21 Amount,
22};
23
25CommandCost CmdChangeBankBalance(DoCommandFlag flags, TileIndex tile, Money delta, CompanyID company, ExpensesType expenses_type);
26CommandCost CmdIncreaseLoan(DoCommandFlag flags, LoanCommand cmd, Money amount);
27CommandCost CmdDecreaseLoan(DoCommandFlag flags, LoanCommand cmd, Money amount);
29CommandCost CmdPause(DoCommandFlag flags, PauseMode mode, bool pause);
30
37
38#endif /* MISC_CMD_H */
Common return value for all commands.
Types related to commands.
@ CMDT_CHEAT
A cheat of some sorts.
@ 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_PAUSE
pause the game
@ CMD_MONEY_CHEAT
do the money cheat
@ CMD_DECREASE_LOAN
decrease the loan from the bank
@ CMD_INCREASE_LOAN
increase the loan from the bank
@ CMD_SET_COMPANY_MAX_LOAN
sets the max loan for the company
@ CMD_CHANGE_BANK_BALANCE
change bank balance to charge costs or give money from a GS
@ CMD_NO_EST
the command is never estimated.
@ CMD_SERVER
the command can only be initiated by the server
@ CMD_DEITY
the command may be executed by COMPANY_DEITY
@ CMD_OFFLINE
the command cannot be executed in a multiplayer game; single-player only
Owner
Enum for all companies/owners.
Types related to the economy.
ExpensesType
Types of expenses.
CommandCost CmdChangeBankBalance(DoCommandFlag flags, TileIndex tile, Money delta, CompanyID company, ExpensesType expenses_type)
Change the bank bank balance of a company by inserting or removing money without affecting the loan.
Definition misc_cmd.cpp:236
CommandCost CmdSetCompanyMaxLoan(DoCommandFlag flags, CompanyID company, Money amount)
Sets the max loan amount of your company.
Definition misc_cmd.cpp:127
CommandCost CmdPause(DoCommandFlag flags, PauseMode mode, bool pause)
Pause/Unpause the game (server-only).
Definition misc_cmd.cpp:169
CommandCost CmdMoneyCheat(DoCommandFlag flags, Money amount)
Change the financial flow of your company.
Definition misc_cmd.cpp:222
CommandCost CmdDecreaseLoan(DoCommandFlag flags, LoanCommand cmd, Money amount)
Decrease the loan of your company.
Definition misc_cmd.cpp:86
CommandCost CmdIncreaseLoan(DoCommandFlag flags, LoanCommand cmd, Money amount)
Increase the loan of your company.
Definition misc_cmd.cpp:39
PauseMode
Modes of pausing we've got.
Definition openttd.h:68