12 #ifndef COMMAND_TYPE_H 13 #define COMMAND_TYPE_H 105 this->success =
false;
366 #define CMD_MSG(x) ((x) << 16) CommandType
Types of commands we have.
clear the order backup of a given user/tile
don't allow building on structures
do not change town rating
change the timetable for a vehicle
DECLARE_ENUM_AS_BIT_SET(GenderEthnicity) enum CompanyManagerFaceVariable
Bitgroups of the CompanyManagerFace variable.
used in multiplayer to create a new companies etc.
set the DC_NO_WATER flag on this command
do not only remove the object on the tile, but also clear any water left on it
No landscaping actions may be executed.
open/close an airport to incoming aircraft
set the vehicle on time feature (timetable)
build a complete road (not a "half" one)
set p2 with the ClientID of the sending client.
remove a complete road (not a "half" one)
static uint32 textref_stack[16]
Values to put on the TextRefStack for the error message.
remove signals along a track (by dragging)
change bank balance to charge costs or give money from a GS
change the server interval of a vehicle
ExpensesType GetExpensesType() const
The expense type of the cost.
query cost only, don't build.
CommandType type
The type of command.
set the DC_AUTO flag on this command
CommandFlags
Command flags for the command table _command_proc_table.
buy a company which is bankrupt
add signals along a track (by dragging)
All actions may be executed.
CommandCost(StringID msg)
Creates a command return value the is failed with the given message.
void UseTextRefStack(const GRFFile *grffile, uint num_registers)
Activate usage of the NewGRF TextRefStack for the error message.
update title of a story page
do a action from the town detail window (like advertises or bribe)
Define a command with the flags which belongs to it.
const char * name
A human readable name for the procedure.
clone (and share) an order
Money GetCost() const
The costs as made up to this moment.
update date of a story page
Common return value for all commands.
set the custom text of a town
void MultiplyCost(int factor)
Multiplies the cost of the command by the given factor.
void AddCost(const Money &cost)
Adds the given cost to the cost of the command.
void MakeError(StringID message)
Makes this CommandCost behave like an error command.
skip an order to the next of specific one
const GRFFile * GetTextRefStackGRF() const
Returns the NewGRF providing the TextRefStack of the error message.
when autoreplace/autorenew is in progress, this shall prevent truncating the amount of cargo in the v...
replace/renew a vehicle while it is in a depot
company bankrupts, skip money check, skip vehicle on tile check in some cases
Pausing/removing companies/server settings.
build a single rail track
hide or unhide a vehicle in the build vehicle and autoreplace GUIs
proceed a train to pass a red signal
add all other shared vehicles to a group which are missing
static const int MAX_CHAR_LENGTH
Max. length of UTF-8 encoded unicode character.
decrease the loan from the bank
CommandPauseLevel
Different command pause levels.
remove all vehicles from a group
mask for all command flags
create a custom news message
Types related to the economy.
remove a story page element
execute the command without sending it on the network
increase the loan from the bank
refit the cargo space of a vehicle
StringID GetErrorMessage() const
Returns the error message of a command.
Construction, modification (incl. refit) and destruction of vehicles.
Structure for buffering the build command when selecting a station to join.
DoCommandFlag
List of flags for a command.
bool Succeeded() const
Did this command succeed?
the command may be executed by COMPANY_DEITY
const GRFFile * textref_stack_grffile
NewGRF providing the TextRefStack content.
CommandCost(ExpensesType ex_t, const Money &cst)
Creates a command return value with the given start cost and expense type.
ExpensesType expense_type
the type of expence as shown on the finances view
set the manager's face of the company
the command's output may differ between test and execute due to town rating changes etc...
set the date that a timetable should start
StringID message
Warning message for when success is unset.
const uint32 * GetTextRefStack() const
Returns a pointer to the values for the TextRefStack of the error message.
don't allow building on water
set the colour of the company
CommandCost(ExpensesType ex_t)
Creates a command cost with given expense type and start cost of 0.
uint textref_stack_size
Number of uint32 values to put on the TextRefStack for the error message.
ExpensesType
Types of expenses.
Renaming stuff, changing company colours, placing signs, etc.
set the goal of a cargo for a town
give money to another company
Construction and destruction of objects on the map.
the command can only be initiated by the server
uint32 StringID
Numeric value that represents a string, independent of the selected language.
the command's string may contain control strings
bool Failed() const
Did this command fail?
update a story page element
force the autoreplace to take action in a given depot
No construction actions may be executed.
the command may be initiated by a spectator
allow this command also on MP_VOID tiles
autoreplace/autorenew is in progress, this shall disable vehicle limits when building, and ignore certain restrictions when undoing things (like vehicle attach callback)
CommandCallback * callback
any callback function executed upon successful completion of the command.
Management of money, i.e. loans and shares.
update goal progress text of a goal
confirm the preview of an engine
execute the given command
uint GetTextRefStackSize() const
Returns the number of uint32 values for the TextRefStack of the error message.
CommandProc * proc
The procedure to actually executing.
Must ALWAYS be on the end of this list!! (period)
uint32 TileIndex
The index/ID of a Tile.
CommandFlags flags
The (command) flags to that apply to this command.
Modifications to route management (orders, groups, etc).
sell a share from a company
create a new story page element
change the president name
FlaggedCommands
Defines some flags.
change the refit information of an order (for "goto depot" )
ask a goal related question
CommandCost CommandProc(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text)
Defines the callback type for all command handler functions.
sell all vehicles which are in a given depot
Stopping, starting, sending to depot, turning around, replace orders etc.
remove a single rail track
set the autoreplace-protection for a group
rename a engine (in the engine list)
TileIndex tile
tile command being executed on.
start/stop all vehicles (in a depot)
Types related to strings.
bool success
Whether the comment went fine up to this moment.
static const StringID INVALID_STRING_ID
Constant representing an invalid string (16bit in case it is used in savegames)
void CommandCallback(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
Define a callback function for the client, after the command is finished.
the command cannot be executed in a multiplayer game; single-player only
Commands
List of commands.
don't allow overlap of rails (used in buildrail)
remove a (rectangle of) tiles from a rail station
Changing settings related to a company.
update goal text of a goal
answer(s) to CMD_GOAL_QUESTION
send a vehicle to a depot
buy a share from a company
No user actions may be executed.
CommandCost()
Creates a command cost return with no cost and no error.
town rating does not disallow you from building
move a rail vehicle (in the depot)
Money cost
The cost of this action.
remove a (rectangle of) tiles from a rail waypoint
uint32 cmd
command being executed.
modify an order (like set full-load)
allow this command also on MP_VOID tiles
turn a road vehicle around
update goal completed status of a goal
Dynamic data of a loaded NewGRF.