summaryrefslogtreecommitdiff
path: root/src/command_type.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-12-07 21:05:27 +0000
committerrubidium <rubidium@openttd.org>2010-12-07 21:05:27 +0000
commitb3eb3b96b9928069583cf2ade0ab09a26d93db85 (patch)
treeed07e545c97c0b087c6bd6acb4cf4e33b52e6399 /src/command_type.h
parent0f2402306ccae50a26c8453d524363637b904128 (diff)
downloadopenttd-b3eb3b96b9928069583cf2ade0ab09a26d93db85.tar.xz
(svn r21425) -Codechange: add "command types" to all commands
Diffstat (limited to 'src/command_type.h')
-rw-r--r--src/command_type.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/command_type.h b/src/command_type.h
index db9cfb06c..9b0179adc 100644
--- a/src/command_type.h
+++ b/src/command_type.h
@@ -331,6 +331,28 @@ enum CommandFlags {
CMD_CLIENT_ID = 0x80, ///< set p2 with the ClientID of the sending client.
};
+/** Types of commands we have. */
+enum CommandType {
+ CMDT_LANDSCAPE_CONSTRUCTION, ///< Construction and destruction of objects on the map.
+ CMDT_VEHICLE_CONSTRUCTION, ///< Construction, modification (incl. refit) and destruction of vehicles.
+ CMDT_MONEY_MANAGEMENT, ///< Management of money, i.e. loans and shares.
+ CMDT_VEHICLE_MANAGEMENT, ///< Stopping, starting, sending to depot, turning around, replace orders etc.
+ CMDT_ROUTE_MANAGEMENT, ///< Modifications to route management (orders, groups, etc).
+ CMDT_OTHER_MANAGEMENT, ///< Renaming stuff, changing company colours, placing signs, etc.
+ CMDT_COMPANY_SETTING, ///< Changing settings related to a company.
+ CMDT_SERVER_SETTING, ///< Pausing/removing companies/server settings.
+
+ CMDT_END, ///< Magic end marker.
+};
+
+/** Different command pause levels. */
+enum CommandPauseLevel {
+ CMDPL_NO_ACTIONS, ///< No user actions may be executed.
+ CMDPL_NO_CONSTRUCTION, ///< No construction actions may be executed.
+ CMDPL_NO_LANDSCAPING, ///< No landscaping actions may be executed.
+ CMDPL_ALL_ACTIONS, ///< All actions may be executed.
+};
+
/**
* Defines the callback type for all command handler functions.
*
@@ -361,6 +383,7 @@ struct Command {
CommandProc *proc; ///< The procedure to actually executing
const char *name; ///< A human readable name for the procedure
byte flags; ///< The (command) flags to that apply to this command
+ CommandType type; ///< The type of command.
};
/**