src/command.h
author peter1138
Fri, 03 Aug 2007 09:08:49 +0000
changeset 7889 f167f5959c24
parent 7718 220603f0122e
child 8017 8c46e61c510f
permissions -rw-r--r--
(svn r10762) -Codechange: Change enum StringIDEnum { to static const StringID = for
each STR_ entry. This avoids the need for a cast to StringID in some
places and thus better type-safety.
2186
461a2aff3486 (svn r2701) Insert Id tags into all source files
tron
parents: 1820
diff changeset
     1
/* $Id$ */
461a2aff3486 (svn r2701) Insert Id tags into all source files
tron
parents: 1820
diff changeset
     2
6449
e520244dc71e (svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents: 6338
diff changeset
     3
/** @file command.h */
e520244dc71e (svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents: 6338
diff changeset
     4
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
     5
#ifndef COMMAND_H
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
     6
#define COMMAND_H
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
     7
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
     8
enum {
4344
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
     9
	CMD_BUILD_RAILROAD_TRACK         =   0,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    10
	CMD_REMOVE_RAILROAD_TRACK        =   1,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    11
	CMD_BUILD_SINGLE_RAIL            =   2,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    12
	CMD_REMOVE_SINGLE_RAIL           =   3,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    13
	CMD_LANDSCAPE_CLEAR              =   4,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    14
	CMD_BUILD_BRIDGE                 =   5,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    15
	CMD_BUILD_RAILROAD_STATION       =   6,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    16
	CMD_BUILD_TRAIN_DEPOT            =   7,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    17
	CMD_BUILD_SIGNALS                =   8,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    18
	CMD_REMOVE_SIGNALS               =   9,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    19
	CMD_TERRAFORM_LAND               =  10,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    20
	CMD_PURCHASE_LAND_AREA           =  11,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    21
	CMD_SELL_LAND_AREA               =  12,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    22
	CMD_BUILD_TUNNEL                 =  13,
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    23
4344
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    24
	CMD_REMOVE_FROM_RAILROAD_STATION =  14,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    25
	CMD_CONVERT_RAIL                 =  15,
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    26
4344
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    27
	CMD_BUILD_TRAIN_WAYPOINT         =  16,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    28
	CMD_RENAME_WAYPOINT              =  17,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    29
	CMD_REMOVE_TRAIN_WAYPOINT        =  18,
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    30
4344
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    31
	CMD_BUILD_ROAD_STOP              =  21,
6338
0fb4f452873c (svn r8735) -Feature: drive-through road stops made possible by the hard work of mart3p.
rubidium
parents: 5726
diff changeset
    32
	CMD_REMOVE_ROAD_STOP             =  22,
4344
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    33
	CMD_BUILD_LONG_ROAD              =  23,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    34
	CMD_REMOVE_LONG_ROAD             =  24,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    35
	CMD_BUILD_ROAD                   =  25,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    36
	CMD_REMOVE_ROAD                  =  26,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    37
	CMD_BUILD_ROAD_DEPOT             =  27,
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    38
4344
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    39
	CMD_BUILD_AIRPORT                =  29,
193
0a7025304867 (svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents: 147
diff changeset
    40
4344
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    41
	CMD_BUILD_DOCK                   =  30,
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    42
4344
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    43
	CMD_BUILD_SHIP_DEPOT             =  31,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    44
	CMD_BUILD_BUOY                   =  32,
1227
3552f20fcfcb (svn r1731) - Fix: [ 1106930 ] BugFix: placing signals with 2x1 drags workaround is completely rewritten. Also features checks for hacked/modified clients. Thanks a lot Hackykid!
darkvater
parents: 1217
diff changeset
    45
4344
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    46
	CMD_PLANT_TREE                   =  33,
2244
e6b5ef68406d (svn r2764) -Feature: Clone vehicles
bjarni
parents: 2186
diff changeset
    47
4344
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    48
	CMD_BUILD_RAIL_VEHICLE           =  34,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    49
	CMD_MOVE_RAIL_VEHICLE            =  35,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    50
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    51
	CMD_START_STOP_TRAIN             =  36,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    52
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    53
	CMD_SELL_RAIL_WAGON              =  38,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    54
4495
b44566fc9025 (svn r6280) -Codechange: Use the same naming for trains as for other vehicles:
Darkvater
parents: 4344
diff changeset
    55
	CMD_SEND_TRAIN_TO_DEPOT          =  39,
4344
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    56
	CMD_FORCE_TRAIN_PROCEED          =  40,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    57
	CMD_REVERSE_TRAIN_DIRECTION      =  41,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    58
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    59
	CMD_MODIFY_ORDER                 =  42,
7290
647d6416cdfe (svn r10033) -Feature [FS#760]: skip to the selected order in the order list when clicking on the "skip" button while pressing CTRL.
rubidium
parents: 7163
diff changeset
    60
	CMD_SKIP_TO_ORDER                =  43,
4344
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    61
	CMD_DELETE_ORDER                 =  44,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    62
	CMD_INSERT_ORDER                 =  45,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    63
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    64
	CMD_CHANGE_SERVICE_INT           =  46,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    65
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    66
	CMD_BUILD_INDUSTRY               =  47,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    67
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    68
	CMD_BUILD_COMPANY_HQ             =  48,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    69
	CMD_SET_PLAYER_FACE              =  49,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    70
	CMD_SET_PLAYER_COLOR             =  50,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    71
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    72
	CMD_INCREASE_LOAN                =  51,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    73
	CMD_DECREASE_LOAN                =  52,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    74
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    75
	CMD_WANT_ENGINE_PREVIEW          =  53,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    76
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    77
	CMD_NAME_VEHICLE                 =  54,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    78
	CMD_RENAME_ENGINE                =  55,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    79
	CMD_CHANGE_COMPANY_NAME          =  56,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    80
	CMD_CHANGE_PRESIDENT_NAME        =  57,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    81
	CMD_RENAME_STATION               =  58,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    82
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    83
	CMD_SELL_AIRCRAFT                =  59,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    84
	CMD_START_STOP_AIRCRAFT          =  60,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    85
	CMD_BUILD_AIRCRAFT               =  61,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    86
	CMD_SEND_AIRCRAFT_TO_HANGAR      =  62,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    87
	CMD_REFIT_AIRCRAFT               =  64,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    88
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    89
	CMD_PLACE_SIGN                   =  65,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    90
	CMD_RENAME_SIGN                  =  66,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    91
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    92
	CMD_BUILD_ROAD_VEH               =  67,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    93
	CMD_START_STOP_ROADVEH           =  68,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    94
	CMD_SELL_ROAD_VEH                =  69,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    95
	CMD_SEND_ROADVEH_TO_DEPOT        =  70,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    96
	CMD_TURN_ROADVEH                 =  71,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    97
	CMD_REFIT_ROAD_VEH               =  72,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    98
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
    99
	CMD_PAUSE                        =  73,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
   100
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
   101
	CMD_BUY_SHARE_IN_COMPANY         =  74,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
   102
	CMD_SELL_SHARE_IN_COMPANY        =  75,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
   103
	CMD_BUY_COMPANY                  =  76,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
   104
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
   105
	CMD_BUILD_TOWN                   =  77,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
   106
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
   107
	CMD_RENAME_TOWN                  =  80,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
   108
	CMD_DO_TOWN_ACTION               =  81,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
   109
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
   110
	CMD_SET_ROAD_DRIVE_SIDE          =  82,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
   111
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
   112
	CMD_CHANGE_DIFFICULTY_LEVEL      =  85,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
   113
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
   114
	CMD_START_STOP_SHIP              =  86,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
   115
	CMD_SELL_SHIP                    =  87,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
   116
	CMD_BUILD_SHIP                   =  88,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
   117
	CMD_SEND_SHIP_TO_DEPOT           =  89,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
   118
	CMD_REFIT_SHIP                   =  91,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
   119
4712
273ec3b182bf (svn r6624) -Feature: added ability to add refit commands to vehicle orders (can only be done in goto depot orders)
bjarni
parents: 4662
diff changeset
   120
	CMD_ORDER_REFIT                  =  98,
4344
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
   121
	CMD_CLONE_ORDER                  =  99,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
   122
	CMD_CLEAR_AREA                   = 100,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
   123
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
   124
	CMD_MONEY_CHEAT                  = 102,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
   125
	CMD_BUILD_CANAL                  = 103,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
   126
6449
e520244dc71e (svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents: 6338
diff changeset
   127
	CMD_PLAYER_CTRL                  = 104, ///< used in multiplayer to create a new player etc.
e520244dc71e (svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents: 6338
diff changeset
   128
	CMD_LEVEL_LAND                   = 105, ///< level land
4344
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
   129
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
   130
	CMD_REFIT_RAIL_VEHICLE           = 106,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
   131
	CMD_RESTORE_ORDER_INDEX          = 107,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
   132
	CMD_BUILD_LOCK                   = 108,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
   133
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
   134
	CMD_BUILD_SIGNAL_TRACK           = 110,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
   135
	CMD_REMOVE_SIGNAL_TRACK          = 111,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
   136
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
   137
	CMD_GIVE_MONEY                   = 113,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
   138
	CMD_CHANGE_PATCH_SETTING         = 114,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
   139
4661
59492734db06 (svn r6544) - Codechange: Rename CmdReplaceVehicle to CmdSetAutoReplace, to reflect what it does.
peter1138
parents: 4659
diff changeset
   140
	CMD_SET_AUTOREPLACE              = 115,
4344
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
   141
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
   142
	CMD_CLONE_VEHICLE                = 116,
4640
cabffc571e55 (svn r6515) -Feature: added "start all" and "stop all" buttons to the depot windows
bjarni
parents: 4495
diff changeset
   143
	CMD_MASS_START_STOP              = 117,
4659
2f99f35d5813 (svn r6542) -Feature: [depot window] added a "sell all vehicles in depot" button
bjarni
parents: 4640
diff changeset
   144
	CMD_DEPOT_SELL_ALL_VEHICLES      = 118,
4662
a20121e5442b (svn r6552) -Feature: [depot window] added a "autoreplace all vehicles in depot" button
bjarni
parents: 4661
diff changeset
   145
	CMD_DEPOT_MASS_AUTOREPLACE       = 119,
7328
8ac64204c17f (svn r10071) -Feature [FS#828]: moving of orders (skidd13).
rubidium
parents: 7290
diff changeset
   146
7139
4ae3ab180d05 (svn r9874) -Feature: advanced vehicle lists a.k.a. group interface. Now you can make groups of vehicles and perform all kinds of tasks on that given group. Original code by nycom and graphics by skidd13.
rubidium
parents: 6987
diff changeset
   147
	CMD_CREATE_GROUP                 = 120,
4ae3ab180d05 (svn r9874) -Feature: advanced vehicle lists a.k.a. group interface. Now you can make groups of vehicles and perform all kinds of tasks on that given group. Original code by nycom and graphics by skidd13.
rubidium
parents: 6987
diff changeset
   148
	CMD_DELETE_GROUP                 = 121,
4ae3ab180d05 (svn r9874) -Feature: advanced vehicle lists a.k.a. group interface. Now you can make groups of vehicles and perform all kinds of tasks on that given group. Original code by nycom and graphics by skidd13.
rubidium
parents: 6987
diff changeset
   149
	CMD_RENAME_GROUP                 = 122,
4ae3ab180d05 (svn r9874) -Feature: advanced vehicle lists a.k.a. group interface. Now you can make groups of vehicles and perform all kinds of tasks on that given group. Original code by nycom and graphics by skidd13.
rubidium
parents: 6987
diff changeset
   150
	CMD_ADD_VEHICLE_GROUP            = 123,
4ae3ab180d05 (svn r9874) -Feature: advanced vehicle lists a.k.a. group interface. Now you can make groups of vehicles and perform all kinds of tasks on that given group. Original code by nycom and graphics by skidd13.
rubidium
parents: 6987
diff changeset
   151
	CMD_ADD_SHARED_VEHICLE_GROUP     = 124,
4ae3ab180d05 (svn r9874) -Feature: advanced vehicle lists a.k.a. group interface. Now you can make groups of vehicles and perform all kinds of tasks on that given group. Original code by nycom and graphics by skidd13.
rubidium
parents: 6987
diff changeset
   152
	CMD_REMOVE_ALL_VEHICLES_GROUP    = 125,
7163
09e65bfbc08b (svn r9898) -Fix (r9874): Many...
peter1138
parents: 7139
diff changeset
   153
	CMD_SET_GROUP_REPLACE_PROTECTION = 126,
7328
8ac64204c17f (svn r10071) -Feature [FS#828]: moving of orders (skidd13).
rubidium
parents: 7290
diff changeset
   154
8ac64204c17f (svn r10071) -Feature [FS#828]: moving of orders (skidd13).
rubidium
parents: 7290
diff changeset
   155
	CMD_MOVE_ORDER                   = 127,
7476
7f086e4b2a76 (svn r10236) -Feature: Introduce a form of timetabling for vehicles.
maedhros
parents: 7446
diff changeset
   156
	CMD_CHANGE_TIMETABLE             = 128,
7f086e4b2a76 (svn r10236) -Feature: Introduce a form of timetabling for vehicles.
maedhros
parents: 7446
diff changeset
   157
	CMD_SET_VEHICLE_ON_TIME          = 129,
7562
f6f62814907b (svn r10331) -Feature: Add the possibility of automatically filling in timetables based on
maedhros
parents: 7486
diff changeset
   158
	CMD_AUTOFILL_TIMETABLE           = 130,
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   159
};
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   160
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   161
enum {
4344
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
   162
	DC_EXEC            = 0x01,
6449
e520244dc71e (svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents: 6338
diff changeset
   163
	DC_AUTO            = 0x02, ///< don't allow building on structures
e520244dc71e (svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents: 6338
diff changeset
   164
	DC_QUERY_COST      = 0x04, ///< query cost only,  don't build.
e520244dc71e (svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents: 6338
diff changeset
   165
	DC_NO_WATER        = 0x08, ///< don't allow building on water
e520244dc71e (svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents: 6338
diff changeset
   166
	DC_NO_RAIL_OVERLAP = 0x10, ///< don't allow overlap of rails (used in buildrail)
e520244dc71e (svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents: 6338
diff changeset
   167
	DC_AI_BUILDING     = 0x20, ///< special building rules for AI
e520244dc71e (svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents: 6338
diff changeset
   168
	DC_NO_TOWN_RATING  = 0x40, ///< town rating does not disallow you from building
e520244dc71e (svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents: 6338
diff changeset
   169
	DC_FORCETEST       = 0x80, ///< force test too.
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   170
};
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   171
6987
b0f13039bda2 (svn r9672) -Cleanup: lots of coding style fixes around operands.
rubidium
parents: 6574
diff changeset
   172
#define CMD_MSG(x) ((x) << 16)
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   173
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   174
enum {
4344
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
   175
	CMD_AUTO                  = 0x0200,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
   176
	CMD_NO_WATER              = 0x0400,
6449
e520244dc71e (svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents: 6338
diff changeset
   177
	CMD_NETWORK_COMMAND       = 0x0800, ///< execute the command without sending it on the network
e520244dc71e (svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents: 6338
diff changeset
   178
	CMD_NO_TEST_IF_IN_NETWORK = 0x1000, ///< When enabled, the command will bypass the no-DC_EXEC round if in network
4344
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 3990
diff changeset
   179
	CMD_SHOW_NO_ERROR         = 0x2000,
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   180
};
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   181
6449
e520244dc71e (svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents: 6338
diff changeset
   182
/** Command flags for the command table _command_proc_table */
1804
7810fc0aa941 (svn r2308) - Fix: enforce server-only and/or offline commands by giving them flags in the process table. This also fixes bug "[ 1190944 ] Many commands not checked for security"
Darkvater
parents: 1796
diff changeset
   183
enum {
6449
e520244dc71e (svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents: 6338
diff changeset
   184
	CMD_SERVER  = 0x1, ///< the command can only be initiated by the server
e520244dc71e (svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents: 6338
diff changeset
   185
	CMD_OFFLINE = 0x2, ///< the command cannot be executed in a multiplayer game; single-player only
1804
7810fc0aa941 (svn r2308) - Fix: enforce server-only and/or offline commands by giving them flags in the process table. This also fixes bug "[ 1190944 ] Many commands not checked for security"
Darkvater
parents: 1796
diff changeset
   186
};
7810fc0aa941 (svn r2308) - Fix: enforce server-only and/or offline commands by giving them flags in the process table. This also fixes bug "[ 1190944 ] Many commands not checked for security"
Darkvater
parents: 1796
diff changeset
   187
7439
0c0e2945c890 (svn r10197) -Codechange: replace int32 with CommandCost where appropriate.
rubidium
parents: 7328
diff changeset
   188
typedef CommandCost CommandProc(TileIndex tile, uint32 flags, uint32 p1, uint32 p2);
3491
4c8427796c64 (svn r4342) Change the first two parameters of commands - virtual pixel coordinates of the tile to operate on - to a TileIndex
tron
parents: 2819
diff changeset
   189
6574
e1d1a12faaf7 (svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents: 6573
diff changeset
   190
struct Command {
1804
7810fc0aa941 (svn r2308) - Fix: enforce server-only and/or offline commands by giving them flags in the process table. This also fixes bug "[ 1190944 ] Many commands not checked for security"
Darkvater
parents: 1796
diff changeset
   191
	CommandProc *proc;
7810fc0aa941 (svn r2308) - Fix: enforce server-only and/or offline commands by giving them flags in the process table. This also fixes bug "[ 1190944 ] Many commands not checked for security"
Darkvater
parents: 1796
diff changeset
   192
	byte flags;
6574
e1d1a12faaf7 (svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents: 6573
diff changeset
   193
};
1804
7810fc0aa941 (svn r2308) - Fix: enforce server-only and/or offline commands by giving them flags in the process table. This also fixes bug "[ 1190944 ] Many commands not checked for security"
Darkvater
parents: 1796
diff changeset
   194
7446
1c4d469f986e (svn r10205) -Codechange: refactor returning of cost, so it can be more easily modified.
rubidium
parents: 7442
diff changeset
   195
static inline bool CmdFailed(CommandCost cost) { return cost.Failed(); }
1c4d469f986e (svn r10205) -Codechange: refactor returning of cost, so it can be more easily modified.
rubidium
parents: 7442
diff changeset
   196
static inline bool CmdSucceeded(CommandCost cost) { return cost.Succeeded(); }
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   197
7889
f167f5959c24 (svn r10762) -Codechange: Change enum StringIDEnum { to static const StringID = for
peter1138
parents: 7718
diff changeset
   198
static const CommandCost CMD_ERROR = CommandCost(INVALID_STRING_ID);
1691
fcd9fefaed02 (svn r2195) Add CmdFailed() as the One True Way(tm) to check if a command failed.
tron
parents: 1623
diff changeset
   199
7889
f167f5959c24 (svn r10762) -Codechange: Change enum StringIDEnum { to static const StringID = for
peter1138
parents: 7718
diff changeset
   200
#define return_cmd_error(errcode) do { return CommandCost(errcode); } while (0)
7442
a4f7989f27d4 (svn r10200) -Codechange: add "shortcut" for !CmdFailed (CmdSucceeded).
rubidium
parents: 7439
diff changeset
   201
6449
e520244dc71e (svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents: 6338
diff changeset
   202
/* command.cpp */
4828
9e32eafd4657 (svn r6752) -Codechange: Move command functions from messy functions.h into command.h
Darkvater
parents: 4712
diff changeset
   203
typedef void CommandCallback(bool success, TileIndex tile, uint32 p1, uint32 p2);
7439
0c0e2945c890 (svn r10197) -Codechange: replace int32 with CommandCost where appropriate.
rubidium
parents: 7328
diff changeset
   204
CommandCost DoCommand(TileIndex tile, uint32 p1, uint32 p2, uint32 flags, uint procc);
7718
220603f0122e (svn r10501) -Fix [FS#1015]: error dialog was sometimes shown on all clients when a command failed instead of only the client that actually did the command.
rubidium
parents: 7562
diff changeset
   205
bool DoCommandP(TileIndex tile, uint32 p1, uint32 p2, CommandCallback *callback, uint32 cmd, bool my_cmd = true);
4828
9e32eafd4657 (svn r6752) -Codechange: Move command functions from messy functions.h into command.h
Darkvater
parents: 4712
diff changeset
   206
9e32eafd4657 (svn r6752) -Codechange: Move command functions from messy functions.h into command.h
Darkvater
parents: 4712
diff changeset
   207
#ifdef ENABLE_NETWORK
9e32eafd4657 (svn r6752) -Codechange: Move command functions from messy functions.h into command.h
Darkvater
parents: 4712
diff changeset
   208
9e32eafd4657 (svn r6752) -Codechange: Move command functions from messy functions.h into command.h
Darkvater
parents: 4712
diff changeset
   209
void NetworkSend_Command(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd, CommandCallback *callback);
9e32eafd4657 (svn r6752) -Codechange: Move command functions from messy functions.h into command.h
Darkvater
parents: 4712
diff changeset
   210
#endif /* ENABLE_NETWORK */
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   211
6449
e520244dc71e (svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents: 6338
diff changeset
   212
extern const char* _cmd_text; ///< Text, which gets sent with a command
1820
9b6458526480 (svn r2324) Introduce _cmd_text for passing strings with a command instead of abusing _decode_parameters as text buffer. This should prevent several possible buffer overruns and is a bit cleaner to use. As bonus it reduces the size of most command packets by 79 bytes.
tron
parents: 1804
diff changeset
   213
959
b031d88c76f3 (svn r1451) Fix some of the signed/unsigned comparison warnings
tron
parents: 903
diff changeset
   214
bool IsValidCommand(uint cmd);
1804
7810fc0aa941 (svn r2308) - Fix: enforce server-only and/or offline commands by giving them flags in the process table. This also fixes bug "[ 1190944 ] Many commands not checked for security"
Darkvater
parents: 1796
diff changeset
   215
byte GetCommandFlags(uint cmd);
7486
d130c10f4dab (svn r10246) -Fix (r10297): some forgotten money conversions and truncation issues. Thanks to benc for providing the patch.
rubidium
parents: 7476
diff changeset
   216
Money GetAvailableMoneyForCommand();
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   217
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   218
#endif /* COMMAND_H */