12 #ifndef COMMAND_FUNC_H 13 #define COMMAND_FUNC_H 35 #define return_cmd_error(errcode) return CommandCost(errcode); 49 extern Money _additional_cash_required;
void CcPlaceSign(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
Callback function that is called after a sign is placed.
don't allow building on structures
set the DC_NO_WATER flag on this command
void NetworkSendCommand(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd, CommandCallback *callback, const char *text, CompanyID company)
Prepare a DoCommand to be send over the network.
void CcGame(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
DoCommand callback function for all commands executed by Game Scripts.
static const CommandCost CMD_ERROR
Define a default return value for a failed command.
void CcCreateGroup(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
Opens a 'Rename group' window for newly created group.
set the DC_AUTO flag on this command
CommandFlags
Command flags for the command table _command_proc_table.
bool IsCommandAllowedWhilePaused(uint32 cmd)
Returns whether the command is allowed while the game is paused.
void CcRoadStop(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
Command callback for building road stops.
Common return value for all commands.
Types related to commands.
void CcAI(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
DoCommand callback function for all commands executed by AIs.
void CcBuildWagon(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
Callback for building wagons.
void CcCloneVehicle(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
This is the Callback method after the cloning attempt of a vehicle.
bool IsValidCommand(uint32 cmd)
void CcBuildRoadTunnel(const CommandCost &result, TileIndex start_tile, uint32 p1, uint32 p2)
Callback executed after a build road tunnel command has been called.
Structure for buffering the build command when selecting a station to join.
DoCommandFlag
List of flags for a command.
void CcBuildIndustry(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
Command callback.
don't allow building on water
static DoCommandFlag CommandFlagsToDCFlags(CommandFlags cmd_flags)
Extracts the DC flags needed for DoCommand from the flags returned by GetCommandFlags.
allow this command also on MP_VOID tiles
Money GetAvailableMoneyForCommand()
void CcBuildBridge(const CommandCost &result, TileIndex end_tile, uint32 p1, uint32 p2)
Callback executed after a build Bridge CMD has been called.
uint32 TileIndex
The index/ID of a Tile.
void CcBuildPrimaryVehicle(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
This is the Callback method after the construction attempt of a primary vehicle.
bool DoCommandP(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd, CommandCallback *callback=NULL, const char *text=NULL, bool my_cmd=true)
CommandCost DoCommand(TileIndex tile, uint32 p1, uint32 p2, DoCommandFlag flags, uint32 cmd, const char *text=NULL)
void CcStartStopVehicle(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
This is the Callback method after attempting to start/stop a vehicle.
Types related to companies.
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.
void CcAddVehicleNewGroup(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
Open rename window after adding a vehicle to a new group via drag and drop.
void CcBuildRailTunnel(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
Command callback for building a tunnel.
Owner
Enum for all companies/owners.
CommandCost DoCommandPInternal(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd, CommandCallback *callback, const char *text, bool my_cmd, bool estimate_only)
const char * GetCommandName(uint32 cmd)
allow this command also on MP_VOID tiles
CommandFlags GetCommandFlags(uint32 cmd)