OpenTTD Source 20260208-master-g43af8e94d0
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 <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
6 */
7
9
10#ifndef MISC_CMD_H
11#define MISC_CMD_H
12
13#include "command_type.h"
14#include "economy_type.h"
15#include "openttd.h"
16
18enum class LoanCommand : uint8_t {
22};
23
24CommandCost CmdMoneyCheat(DoCommandFlags, Money amount);
25CommandCost CmdChangeBankBalance(DoCommandFlags flags, TileIndex tile, Money delta, CompanyID company, ExpensesType expenses_type);
26CommandCost CmdIncreaseLoan(DoCommandFlags flags, LoanCommand cmd, Money amount);
27CommandCost CmdDecreaseLoan(DoCommandFlags flags, LoanCommand cmd, Money amount);
28CommandCost CmdSetCompanyMaxLoan(DoCommandFlags flags, CompanyID company, Money amount);
29CommandCost CmdPause(DoCommandFlags flags, PauseMode mode, bool pause);
30
37
38#endif /* MISC_CMD_H */
Common return value for all commands.
Types related to commands.
@ Cheat
A cheat of some sorts.
@ MoneyManagement
Management of money, i.e. loans.
@ ServerSetting
Pausing/removing companies/server settings.
@ NoEst
the command is never estimated.
@ Deity
the command may be executed by COMPANY_DEITY
@ Offline
the command cannot be executed in a multiplayer game; single-player only
@ Server
the command can only be initiated by the server
@ Pause
pause the game
@ DecreaseLoan
decrease the loan from the bank
@ MoneyCheat
do the money cheat
@ IncreaseLoan
increase the loan from the bank
@ ChangeBankBalance
change bank balance to charge costs or give money from a GS
@ SetCompanyMaxLoan
sets the max loan for the company
Types related to the economy.
ExpensesType
Types of expenses.
CommandCost CmdChangeBankBalance(DoCommandFlags 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:240
CommandCost CmdDecreaseLoan(DoCommandFlags flags, LoanCommand cmd, Money amount)
Decrease the loan of your company.
Definition misc_cmd.cpp:87
CommandCost CmdIncreaseLoan(DoCommandFlags flags, LoanCommand cmd, Money amount)
Increase the loan of your company.
Definition misc_cmd.cpp:41
CommandCost CmdMoneyCheat(DoCommandFlags, Money amount)
Change the financial flow of your company.
Definition misc_cmd.cpp:226
CommandCost CmdPause(DoCommandFlags flags, PauseMode mode, bool pause)
Pause/Unpause the game (server-only).
Definition misc_cmd.cpp:170
CommandCost CmdSetCompanyMaxLoan(DoCommandFlags flags, CompanyID company, Money amount)
Sets the max loan amount of your company.
Definition misc_cmd.cpp:128
CommandCost CmdChangeBankBalance(DoCommandFlags 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:240
CommandCost CmdDecreaseLoan(DoCommandFlags flags, LoanCommand cmd, Money amount)
Decrease the loan of your company.
Definition misc_cmd.cpp:87
CommandCost CmdIncreaseLoan(DoCommandFlags flags, LoanCommand cmd, Money amount)
Increase the loan of your company.
Definition misc_cmd.cpp:41
CommandCost CmdMoneyCheat(DoCommandFlags, Money amount)
Change the financial flow of your company.
Definition misc_cmd.cpp:226
CommandCost CmdPause(DoCommandFlags flags, PauseMode mode, bool pause)
Pause/Unpause the game (server-only).
Definition misc_cmd.cpp:170
CommandCost CmdSetCompanyMaxLoan(DoCommandFlags flags, CompanyID company, Money amount)
Sets the max loan amount of your company.
Definition misc_cmd.cpp:128
LoanCommand
Different ways to determine the amount to loan/repay.
Definition misc_cmd.h:18
@ Max
Loan/repay the maximum amount permitting money/settings.
Definition misc_cmd.h:20
@ Amount
Loan/repay the given amount.
Definition misc_cmd.h:21
@ Interval
Loan/repay LOAN_INTERVAL.
Definition misc_cmd.h:19
Some generic types.
PauseMode
Modes of pausing we've got.
Definition openttd.h:68
StrongType::Typedef< uint32_t, struct TileIndexTag, StrongType::Compare, StrongType::Integer, StrongType::Compatible< int32_t >, StrongType::Compatible< int64_t > > TileIndex
The index/ID of a Tile.
Definition tile_type.h:92