Codechange: Pass unpacked command arguments to command callbacks (except Script).
This commit is contained in:
@@ -428,6 +428,20 @@ template <Commands Tcmd> struct CommandTraits;
|
||||
/** Storage buffer for serialized command data. */
|
||||
typedef std::vector<byte> CommandDataBuffer;
|
||||
|
||||
/**
|
||||
* Define a callback function for the client, after the command is finished.
|
||||
*
|
||||
* Functions of this type are called after the command is finished. The parameters
|
||||
* are from the #CommandProc callback type. The boolean parameter indicates if the
|
||||
* command succeeded or failed.
|
||||
*
|
||||
* @param cmd The command that was executed
|
||||
* @param result The result of the executed command
|
||||
* @param tile The tile of the command action
|
||||
* @see CommandProc
|
||||
*/
|
||||
typedef void CommandCallback(Commands cmd, const CommandCost &result, TileIndex tile);
|
||||
|
||||
/**
|
||||
* Define a callback function for the client, after the command is finished.
|
||||
*
|
||||
@@ -441,6 +455,6 @@ typedef std::vector<byte> CommandDataBuffer;
|
||||
* @param data Additional data of the command
|
||||
* @see CommandProc
|
||||
*/
|
||||
typedef void CommandCallback(Commands cmd, const CommandCost &result, TileIndex tile, const CommandDataBuffer &data);
|
||||
typedef void CommandCallbackData(Commands cmd, const CommandCost &result, TileIndex tile, const CommandDataBuffer &data);
|
||||
|
||||
#endif /* COMMAND_TYPE_H */
|
||||
|
||||
Reference in New Issue
Block a user