author | peter1138 |
Sun, 03 Aug 2008 17:35:08 +0000 | |
changeset 9834 | 7474149531c1 |
parent 9628 | 981ba3800c35 |
child 9921 | 4dfac3c48507 |
permissions | -rw-r--r-- |
8116
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
1 |
/* $Id$ */ |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
2 |
|
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
3 |
/** @file command_type.h Types related to commands. */ |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
4 |
|
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
5 |
#ifndef COMMAND_TYPE_H |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
6 |
#define COMMAND_TYPE_H |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
7 |
|
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
8 |
#include "economy_type.h" |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
9 |
#include "strings_type.h" |
8123
ce31d2843a95
(svn r11684) -Codechange: split gfx.h in a type and functional header.
rubidium
parents:
8116
diff
changeset
|
10 |
#include "tile_type.h" |
8116
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
11 |
|
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
12 |
/** |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
13 |
* Common return value for all commands. Wraps the cost and |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
14 |
* a possible error message/state together. |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
15 |
*/ |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
16 |
class CommandCost { |
8230
64f28fe2d5c8
(svn r11793) -Codechange: pass the expense type via the CommandCost instead of a global variable. Patch by Noldo (FS#1114).
rubidium
parents:
8123
diff
changeset
|
17 |
ExpensesType expense_type; ///< the type of expence as shown on the finances view |
8116
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
18 |
Money cost; ///< The cost of this action |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
19 |
StringID message; ///< Warning message for when success is unset |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
20 |
bool success; ///< Whether the comment went fine up to this moment |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
21 |
|
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
22 |
public: |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
23 |
/** |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
24 |
* Creates a command cost return with no cost and no error |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
25 |
*/ |
8230
64f28fe2d5c8
(svn r11793) -Codechange: pass the expense type via the CommandCost instead of a global variable. Patch by Noldo (FS#1114).
rubidium
parents:
8123
diff
changeset
|
26 |
CommandCost() : expense_type(INVALID_EXPENSES), cost(0), message(INVALID_STRING_ID), success(true) {} |
8116
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
27 |
|
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
28 |
/** |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
29 |
* Creates a command return value the is failed with the given message |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
30 |
*/ |
8230
64f28fe2d5c8
(svn r11793) -Codechange: pass the expense type via the CommandCost instead of a global variable. Patch by Noldo (FS#1114).
rubidium
parents:
8123
diff
changeset
|
31 |
CommandCost(StringID msg) : expense_type(INVALID_EXPENSES), cost(0), message(msg), success(false) {} |
8116
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
32 |
|
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
33 |
/** |
8230
64f28fe2d5c8
(svn r11793) -Codechange: pass the expense type via the CommandCost instead of a global variable. Patch by Noldo (FS#1114).
rubidium
parents:
8123
diff
changeset
|
34 |
* Creates a command cost with given expense type and start cost of 0 |
64f28fe2d5c8
(svn r11793) -Codechange: pass the expense type via the CommandCost instead of a global variable. Patch by Noldo (FS#1114).
rubidium
parents:
8123
diff
changeset
|
35 |
* @param ex_t the expense type |
64f28fe2d5c8
(svn r11793) -Codechange: pass the expense type via the CommandCost instead of a global variable. Patch by Noldo (FS#1114).
rubidium
parents:
8123
diff
changeset
|
36 |
*/ |
64f28fe2d5c8
(svn r11793) -Codechange: pass the expense type via the CommandCost instead of a global variable. Patch by Noldo (FS#1114).
rubidium
parents:
8123
diff
changeset
|
37 |
CommandCost(ExpensesType ex_t) : expense_type(ex_t), cost(0), message(INVALID_STRING_ID), success(true) {} |
64f28fe2d5c8
(svn r11793) -Codechange: pass the expense type via the CommandCost instead of a global variable. Patch by Noldo (FS#1114).
rubidium
parents:
8123
diff
changeset
|
38 |
|
64f28fe2d5c8
(svn r11793) -Codechange: pass the expense type via the CommandCost instead of a global variable. Patch by Noldo (FS#1114).
rubidium
parents:
8123
diff
changeset
|
39 |
/** |
64f28fe2d5c8
(svn r11793) -Codechange: pass the expense type via the CommandCost instead of a global variable. Patch by Noldo (FS#1114).
rubidium
parents:
8123
diff
changeset
|
40 |
* Creates a command return value with the given start cost and expense type |
64f28fe2d5c8
(svn r11793) -Codechange: pass the expense type via the CommandCost instead of a global variable. Patch by Noldo (FS#1114).
rubidium
parents:
8123
diff
changeset
|
41 |
* @param ex_t the expense type |
8116
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
42 |
* @param cst the initial cost of this command |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
43 |
*/ |
8230
64f28fe2d5c8
(svn r11793) -Codechange: pass the expense type via the CommandCost instead of a global variable. Patch by Noldo (FS#1114).
rubidium
parents:
8123
diff
changeset
|
44 |
CommandCost(ExpensesType ex_t, Money cst) : expense_type(ex_t), cost(cst), message(INVALID_STRING_ID), success(true) {} |
8116
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
45 |
|
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
46 |
/** |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
47 |
* Adds the cost of the given command return value to this cost. |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
48 |
* Also takes a possible error message when it is set. |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
49 |
* @param ret the command to add the cost of. |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
50 |
* @return this class. |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
51 |
*/ |
8854
d3f0e0960fb9
(svn r12616) -Codechange: r12591 didn't work as expected for NDS, move one function back to cpp
smatz
parents:
8841
diff
changeset
|
52 |
CommandCost AddCost(CommandCost ret); |
8116
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
53 |
|
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
54 |
/** |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
55 |
* Adds the given cost to the cost of the command. |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
56 |
* @param cost the cost to add |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
57 |
* @return this class. |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
58 |
*/ |
8841
4a72a01136fc
(svn r12591) -Codechange: move CommandCost accessors to header file, 8kB of binary size saved
smatz
parents:
8519
diff
changeset
|
59 |
CommandCost AddCost(Money cost) |
4a72a01136fc
(svn r12591) -Codechange: move CommandCost accessors to header file, 8kB of binary size saved
smatz
parents:
8519
diff
changeset
|
60 |
{ |
4a72a01136fc
(svn r12591) -Codechange: move CommandCost accessors to header file, 8kB of binary size saved
smatz
parents:
8519
diff
changeset
|
61 |
this->cost += cost; |
4a72a01136fc
(svn r12591) -Codechange: move CommandCost accessors to header file, 8kB of binary size saved
smatz
parents:
8519
diff
changeset
|
62 |
return *this; |
4a72a01136fc
(svn r12591) -Codechange: move CommandCost accessors to header file, 8kB of binary size saved
smatz
parents:
8519
diff
changeset
|
63 |
} |
8116
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
64 |
|
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
65 |
/** |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
66 |
* Multiplies the cost of the command by the given factor. |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
67 |
* @param cost factor to multiply the costs with |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
68 |
* @return this class |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
69 |
*/ |
8841
4a72a01136fc
(svn r12591) -Codechange: move CommandCost accessors to header file, 8kB of binary size saved
smatz
parents:
8519
diff
changeset
|
70 |
CommandCost MultiplyCost(int factor) |
4a72a01136fc
(svn r12591) -Codechange: move CommandCost accessors to header file, 8kB of binary size saved
smatz
parents:
8519
diff
changeset
|
71 |
{ |
4a72a01136fc
(svn r12591) -Codechange: move CommandCost accessors to header file, 8kB of binary size saved
smatz
parents:
8519
diff
changeset
|
72 |
this->cost *= factor; |
4a72a01136fc
(svn r12591) -Codechange: move CommandCost accessors to header file, 8kB of binary size saved
smatz
parents:
8519
diff
changeset
|
73 |
return *this; |
4a72a01136fc
(svn r12591) -Codechange: move CommandCost accessors to header file, 8kB of binary size saved
smatz
parents:
8519
diff
changeset
|
74 |
} |
8116
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
75 |
|
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
76 |
/** |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
77 |
* The costs as made up to this moment |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
78 |
* @return the costs |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
79 |
*/ |
8841
4a72a01136fc
(svn r12591) -Codechange: move CommandCost accessors to header file, 8kB of binary size saved
smatz
parents:
8519
diff
changeset
|
80 |
Money GetCost() const |
4a72a01136fc
(svn r12591) -Codechange: move CommandCost accessors to header file, 8kB of binary size saved
smatz
parents:
8519
diff
changeset
|
81 |
{ |
4a72a01136fc
(svn r12591) -Codechange: move CommandCost accessors to header file, 8kB of binary size saved
smatz
parents:
8519
diff
changeset
|
82 |
return this->cost; |
4a72a01136fc
(svn r12591) -Codechange: move CommandCost accessors to header file, 8kB of binary size saved
smatz
parents:
8519
diff
changeset
|
83 |
} |
8116
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
84 |
|
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
85 |
/** |
8230
64f28fe2d5c8
(svn r11793) -Codechange: pass the expense type via the CommandCost instead of a global variable. Patch by Noldo (FS#1114).
rubidium
parents:
8123
diff
changeset
|
86 |
* The expense type of the cost |
64f28fe2d5c8
(svn r11793) -Codechange: pass the expense type via the CommandCost instead of a global variable. Patch by Noldo (FS#1114).
rubidium
parents:
8123
diff
changeset
|
87 |
* @return the expense type |
64f28fe2d5c8
(svn r11793) -Codechange: pass the expense type via the CommandCost instead of a global variable. Patch by Noldo (FS#1114).
rubidium
parents:
8123
diff
changeset
|
88 |
*/ |
8841
4a72a01136fc
(svn r12591) -Codechange: move CommandCost accessors to header file, 8kB of binary size saved
smatz
parents:
8519
diff
changeset
|
89 |
ExpensesType GetExpensesType() const |
4a72a01136fc
(svn r12591) -Codechange: move CommandCost accessors to header file, 8kB of binary size saved
smatz
parents:
8519
diff
changeset
|
90 |
{ |
4a72a01136fc
(svn r12591) -Codechange: move CommandCost accessors to header file, 8kB of binary size saved
smatz
parents:
8519
diff
changeset
|
91 |
return this->expense_type; |
4a72a01136fc
(svn r12591) -Codechange: move CommandCost accessors to header file, 8kB of binary size saved
smatz
parents:
8519
diff
changeset
|
92 |
} |
8230
64f28fe2d5c8
(svn r11793) -Codechange: pass the expense type via the CommandCost instead of a global variable. Patch by Noldo (FS#1114).
rubidium
parents:
8123
diff
changeset
|
93 |
|
64f28fe2d5c8
(svn r11793) -Codechange: pass the expense type via the CommandCost instead of a global variable. Patch by Noldo (FS#1114).
rubidium
parents:
8123
diff
changeset
|
94 |
/** |
8116
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
95 |
* Sets the global error message *if* this class has one. |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
96 |
*/ |
8841
4a72a01136fc
(svn r12591) -Codechange: move CommandCost accessors to header file, 8kB of binary size saved
smatz
parents:
8519
diff
changeset
|
97 |
void SetGlobalErrorMessage() const |
4a72a01136fc
(svn r12591) -Codechange: move CommandCost accessors to header file, 8kB of binary size saved
smatz
parents:
8519
diff
changeset
|
98 |
{ |
4a72a01136fc
(svn r12591) -Codechange: move CommandCost accessors to header file, 8kB of binary size saved
smatz
parents:
8519
diff
changeset
|
99 |
extern StringID _error_message; |
4a72a01136fc
(svn r12591) -Codechange: move CommandCost accessors to header file, 8kB of binary size saved
smatz
parents:
8519
diff
changeset
|
100 |
if (this->message != INVALID_STRING_ID) _error_message = this->message; |
4a72a01136fc
(svn r12591) -Codechange: move CommandCost accessors to header file, 8kB of binary size saved
smatz
parents:
8519
diff
changeset
|
101 |
} |
8116
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
102 |
|
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
103 |
/** |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
104 |
* Did this command succeed? |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
105 |
* @return true if and only if it succeeded |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
106 |
*/ |
8841
4a72a01136fc
(svn r12591) -Codechange: move CommandCost accessors to header file, 8kB of binary size saved
smatz
parents:
8519
diff
changeset
|
107 |
bool Succeeded() const |
4a72a01136fc
(svn r12591) -Codechange: move CommandCost accessors to header file, 8kB of binary size saved
smatz
parents:
8519
diff
changeset
|
108 |
{ |
4a72a01136fc
(svn r12591) -Codechange: move CommandCost accessors to header file, 8kB of binary size saved
smatz
parents:
8519
diff
changeset
|
109 |
return this->success; |
4a72a01136fc
(svn r12591) -Codechange: move CommandCost accessors to header file, 8kB of binary size saved
smatz
parents:
8519
diff
changeset
|
110 |
} |
8116
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
111 |
|
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
112 |
/** |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
113 |
* Did this command fail? |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
114 |
* @return true if and only if it failed |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
115 |
*/ |
8841
4a72a01136fc
(svn r12591) -Codechange: move CommandCost accessors to header file, 8kB of binary size saved
smatz
parents:
8519
diff
changeset
|
116 |
bool Failed() const |
4a72a01136fc
(svn r12591) -Codechange: move CommandCost accessors to header file, 8kB of binary size saved
smatz
parents:
8519
diff
changeset
|
117 |
{ |
4a72a01136fc
(svn r12591) -Codechange: move CommandCost accessors to header file, 8kB of binary size saved
smatz
parents:
8519
diff
changeset
|
118 |
return !this->success; |
4a72a01136fc
(svn r12591) -Codechange: move CommandCost accessors to header file, 8kB of binary size saved
smatz
parents:
8519
diff
changeset
|
119 |
} |
8116
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
120 |
}; |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
121 |
|
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
122 |
/** |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
123 |
* List of commands. |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
124 |
* |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
125 |
* This enum defines all possible commands which can be executed to the game |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
126 |
* engine. Observing the game like the query-tool or checking the profit of a |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
127 |
* vehicle don't result in a command which should be executed in the engine |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
128 |
* nor send to the server in a network game. |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
129 |
* |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
130 |
* @see _command_proc_table |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
131 |
*/ |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
132 |
enum { |
8500
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
133 |
CMD_BUILD_RAILROAD_TRACK, ///< build a rail track |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
134 |
CMD_REMOVE_RAILROAD_TRACK, ///< remove a rail track |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
135 |
CMD_BUILD_SINGLE_RAIL, ///< build a single rail track |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
136 |
CMD_REMOVE_SINGLE_RAIL, ///< remove a single rail track |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
137 |
CMD_LANDSCAPE_CLEAR, ///< demolish a tile |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
138 |
CMD_BUILD_BRIDGE, ///< build a bridge |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
139 |
CMD_BUILD_RAILROAD_STATION, ///< build a railroad station |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
140 |
CMD_BUILD_TRAIN_DEPOT, ///< build a train depot |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
141 |
CMD_BUILD_SIGNALS, ///< build a signal |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
142 |
CMD_REMOVE_SIGNALS, ///< remove a signal |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
143 |
CMD_TERRAFORM_LAND, ///< terraform a tile |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
144 |
CMD_PURCHASE_LAND_AREA, ///< purchase a tile |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
145 |
CMD_SELL_LAND_AREA, ///< sell a bought tile before |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
146 |
CMD_BUILD_TUNNEL, ///< build a tunnel |
8116
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
147 |
|
8500
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
148 |
CMD_REMOVE_FROM_RAILROAD_STATION, ///< remove a tile station |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
149 |
CMD_CONVERT_RAIL, ///< convert a rail type |
8116
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
150 |
|
8500
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
151 |
CMD_BUILD_TRAIN_WAYPOINT, ///< build a waypoint |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
152 |
CMD_RENAME_WAYPOINT, ///< rename a waypoint |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
153 |
CMD_REMOVE_TRAIN_WAYPOINT, ///< remove a waypoint |
8116
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
154 |
|
8500
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
155 |
CMD_BUILD_ROAD_STOP, ///< build a road stop |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
156 |
CMD_REMOVE_ROAD_STOP, ///< remove a road stop |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
157 |
CMD_BUILD_LONG_ROAD, ///< build a complete road (not a "half" one) |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
158 |
CMD_REMOVE_LONG_ROAD, ///< remove a complete road (not a "half" one) |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
159 |
CMD_BUILD_ROAD, ///< build a "half" road |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
160 |
CMD_REMOVE_ROAD, ///< remove a "half" road |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
161 |
CMD_BUILD_ROAD_DEPOT, ///< build a road depot |
8116
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
162 |
|
8500
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
163 |
CMD_BUILD_AIRPORT, ///< build an airport |
8116
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
164 |
|
8500
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
165 |
CMD_BUILD_DOCK, ///< build a dock |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
166 |
|
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
167 |
CMD_BUILD_SHIP_DEPOT, ///< build a ship depot |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
168 |
CMD_BUILD_BUOY, ///< build a buoy |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
169 |
|
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
170 |
CMD_PLANT_TREE, ///< plant a tree |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
171 |
|
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
172 |
CMD_BUILD_RAIL_VEHICLE, ///< build a rail vehicle |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
173 |
CMD_MOVE_RAIL_VEHICLE, ///< move a rail vehicle (in the depot) |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
174 |
|
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
175 |
CMD_START_STOP_TRAIN, ///< start or stop a train |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
176 |
|
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
177 |
CMD_SELL_RAIL_WAGON, ///< sell a rail wagon |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
178 |
|
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
179 |
CMD_SEND_TRAIN_TO_DEPOT, ///< send a train to a depot |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
180 |
CMD_FORCE_TRAIN_PROCEED, ///< proceed a train to pass a red signal |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
181 |
CMD_REVERSE_TRAIN_DIRECTION, ///< turn a train around |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
182 |
|
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
183 |
CMD_MODIFY_ORDER, ///< modify an order (like set full-load) |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
184 |
CMD_SKIP_TO_ORDER, ///< skip an order to the next of specific one |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
185 |
CMD_DELETE_ORDER, ///< delete an order |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
186 |
CMD_INSERT_ORDER, ///< insert a new order |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
187 |
|
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
188 |
CMD_CHANGE_SERVICE_INT, ///< change the server interval of a vehicle |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
189 |
|
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
190 |
CMD_BUILD_INDUSTRY, ///< build a new industry |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
191 |
|
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
192 |
CMD_BUILD_COMPANY_HQ, ///< build the company headquarter |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
193 |
CMD_SET_PLAYER_FACE, ///< set the face of the player/company |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
194 |
CMD_SET_PLAYER_COLOR, ///< set the color of the player/company |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
195 |
|
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
196 |
CMD_INCREASE_LOAN, ///< increase the loan from the bank |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
197 |
CMD_DECREASE_LOAN, ///< decrease the loan from the bank |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
198 |
|
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
199 |
CMD_WANT_ENGINE_PREVIEW, ///< confirm the preview of an engine |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
200 |
|
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
201 |
CMD_NAME_VEHICLE, ///< rename a whole vehicle |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
202 |
CMD_RENAME_ENGINE, ///< rename a engine (in the engine list) |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
203 |
CMD_CHANGE_COMPANY_NAME, ///< change the company name |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
204 |
CMD_CHANGE_PRESIDENT_NAME, ///< change the president name |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
205 |
CMD_RENAME_STATION, ///< rename a station |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
206 |
|
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
207 |
CMD_SELL_AIRCRAFT, ///< sell an aircraft |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
208 |
CMD_START_STOP_AIRCRAFT, ///< start/stop an aircraft |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
209 |
CMD_BUILD_AIRCRAFT, ///< build an aircraft |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
210 |
CMD_SEND_AIRCRAFT_TO_HANGAR, ///< send an aircraft to a hanger |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
211 |
CMD_REFIT_AIRCRAFT, ///< refit the cargo space of an aircraft |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
212 |
|
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
213 |
CMD_PLACE_SIGN, ///< place a sign |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
214 |
CMD_RENAME_SIGN, ///< rename a sign |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
215 |
|
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
216 |
CMD_BUILD_ROAD_VEH, ///< build a road vehicle |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
217 |
CMD_START_STOP_ROADVEH, ///< start/stop a road vehicle |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
218 |
CMD_SELL_ROAD_VEH, ///< sell a road vehicle |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
219 |
CMD_SEND_ROADVEH_TO_DEPOT, ///< send a road vehicle to the depot |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
220 |
CMD_TURN_ROADVEH, ///< turn a road vehicle around |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
221 |
CMD_REFIT_ROAD_VEH, ///< refit the cargo space of a road vehicle |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
222 |
|
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
223 |
CMD_PAUSE, ///< pause the game |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
224 |
|
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
225 |
CMD_BUY_SHARE_IN_COMPANY, ///< buy a share from a company |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
226 |
CMD_SELL_SHARE_IN_COMPANY, ///< sell a share from a company |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
227 |
CMD_BUY_COMPANY, ///< buy a company which is bankrupt |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
228 |
|
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
229 |
CMD_BUILD_TOWN, ///< build a town |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
230 |
|
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
231 |
CMD_RENAME_TOWN, ///< rename a town |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
232 |
CMD_DO_TOWN_ACTION, ///< do a action from the town detail window (like advertises or bribe) |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
233 |
|
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
234 |
CMD_SET_ROAD_DRIVE_SIDE, ///< set the side where the road vehicles drive |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
235 |
|
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
236 |
CMD_START_STOP_SHIP, ///< start/stop a ship |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
237 |
CMD_SELL_SHIP, ///< sell a ship |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
238 |
CMD_BUILD_SHIP, ///< build a new ship |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
239 |
CMD_SEND_SHIP_TO_DEPOT, ///< send a ship to a depot |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
240 |
CMD_REFIT_SHIP, ///< refit the cargo space of a ship |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
241 |
|
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
242 |
CMD_ORDER_REFIT, ///< change the refit informaction of an order (for "goto depot" ) |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
243 |
CMD_CLONE_ORDER, ///< clone (and share) an order |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
244 |
CMD_CLEAR_AREA, ///< clear an area |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
245 |
|
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
246 |
CMD_MONEY_CHEAT, ///< do the money cheat |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
247 |
CMD_BUILD_CANAL, ///< build a canal |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
248 |
|
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
249 |
CMD_PLAYER_CTRL, ///< used in multiplayer to create a new player etc. |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
250 |
CMD_LEVEL_LAND, ///< level land |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
251 |
|
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
252 |
CMD_REFIT_RAIL_VEHICLE, ///< refit the cargo space of a train |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
253 |
CMD_RESTORE_ORDER_INDEX, ///< restore vehicle order-index and service interval |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
254 |
CMD_BUILD_LOCK, ///< build a lock |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
255 |
|
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
256 |
CMD_BUILD_SIGNAL_TRACK, ///< add signals along a track (by dragging) |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
257 |
CMD_REMOVE_SIGNAL_TRACK, ///< remove signals along a track (by dragging) |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
258 |
|
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
259 |
CMD_GIVE_MONEY, ///< give money to an other player |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
260 |
CMD_CHANGE_PATCH_SETTING, ///< change a patch setting |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
261 |
|
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
262 |
CMD_SET_AUTOREPLACE, ///< set an autoreplace entry |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
263 |
|
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
264 |
CMD_CLONE_VEHICLE, ///< clone a vehicle |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
265 |
CMD_MASS_START_STOP, ///< start/stop all vehicles (in a depot) |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
266 |
CMD_DEPOT_SELL_ALL_VEHICLES, ///< sell all vehicles which are in a given depot |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
267 |
CMD_DEPOT_MASS_AUTOREPLACE, ///< force the autoreplace to take action in a given depot |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
268 |
|
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
269 |
CMD_CREATE_GROUP, ///< create a new group |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
270 |
CMD_DELETE_GROUP, ///< delete a group |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
271 |
CMD_RENAME_GROUP, ///< rename a group |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
272 |
CMD_ADD_VEHICLE_GROUP, ///< add a vehicle to a group |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
273 |
CMD_ADD_SHARED_VEHICLE_GROUP, ///< add all other shared vehicles to a group which are missing |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
274 |
CMD_REMOVE_ALL_VEHICLES_GROUP, ///< remove all vehicles from a group |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
275 |
CMD_SET_GROUP_REPLACE_PROTECTION, ///< set the autoreplace-protection for a group |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
276 |
|
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
277 |
CMD_MOVE_ORDER, ///< move an order |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
278 |
CMD_CHANGE_TIMETABLE, ///< change the timetable for a vehicle |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
279 |
CMD_SET_VEHICLE_ON_TIME, ///< set the vehicle on time feature (timetable) |
133710926f7a
(svn r12075) -Codechange: Remove explicit numbering on command enum, and remove blanks from command list where old commands have been removed.
peter1138
parents:
8486
diff
changeset
|
280 |
CMD_AUTOFILL_TIMETABLE, ///< autofill the timetable |
8116
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
281 |
}; |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
282 |
|
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
283 |
/** |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
284 |
* List of flags for a command. |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
285 |
* |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
286 |
* This enums defines some flags which can be used for the commands. |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
287 |
*/ |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
288 |
enum { |
9628
981ba3800c35
(svn r13691) -Codechange: make it easier to determine whether a command is ran in the context of autoreplace or not
smatz
parents:
9359
diff
changeset
|
289 |
DC_EXEC = 0x001, ///< execute the given command |
981ba3800c35
(svn r13691) -Codechange: make it easier to determine whether a command is ran in the context of autoreplace or not
smatz
parents:
9359
diff
changeset
|
290 |
DC_AUTO = 0x002, ///< don't allow building on structures |
981ba3800c35
(svn r13691) -Codechange: make it easier to determine whether a command is ran in the context of autoreplace or not
smatz
parents:
9359
diff
changeset
|
291 |
DC_QUERY_COST = 0x004, ///< query cost only, don't build. |
981ba3800c35
(svn r13691) -Codechange: make it easier to determine whether a command is ran in the context of autoreplace or not
smatz
parents:
9359
diff
changeset
|
292 |
DC_NO_WATER = 0x008, ///< don't allow building on water |
981ba3800c35
(svn r13691) -Codechange: make it easier to determine whether a command is ran in the context of autoreplace or not
smatz
parents:
9359
diff
changeset
|
293 |
DC_NO_RAIL_OVERLAP = 0x010, ///< don't allow overlap of rails (used in buildrail) |
981ba3800c35
(svn r13691) -Codechange: make it easier to determine whether a command is ran in the context of autoreplace or not
smatz
parents:
9359
diff
changeset
|
294 |
DC_AI_BUILDING = 0x020, ///< special building rules for AI |
981ba3800c35
(svn r13691) -Codechange: make it easier to determine whether a command is ran in the context of autoreplace or not
smatz
parents:
9359
diff
changeset
|
295 |
DC_NO_TOWN_RATING = 0x040, ///< town rating does not disallow you from building |
981ba3800c35
(svn r13691) -Codechange: make it easier to determine whether a command is ran in the context of autoreplace or not
smatz
parents:
9359
diff
changeset
|
296 |
DC_BANKRUPT = 0x080, ///< company bankrupts, skip money check, skip vehicle on tile check in some cases |
981ba3800c35
(svn r13691) -Codechange: make it easier to determine whether a command is ran in the context of autoreplace or not
smatz
parents:
9359
diff
changeset
|
297 |
DC_AUTOREPLACE = 0x100, ///< autoreplace/autorenew is in progress |
8116
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
298 |
}; |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
299 |
|
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
300 |
/** |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
301 |
* Used to combine a StringID with the command. |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
302 |
* |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
303 |
* This macro can be used to add a StringID (the error message to show) on a command-id |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
304 |
* (CMD_xxx). Use the binary or-operator "|" to combine the command with the result from |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
305 |
* this macro. |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
306 |
* |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
307 |
* @param x The StringID to combine with a command-id |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
308 |
*/ |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
309 |
#define CMD_MSG(x) ((x) << 16) |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
310 |
|
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
311 |
/** |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
312 |
* Defines some flags. |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
313 |
* |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
314 |
* This enumeration defines some flags which are binary-or'ed on a command. |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
315 |
*/ |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
316 |
enum { |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
317 |
CMD_NO_WATER = 0x0400, ///< dont build on water |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
318 |
CMD_NETWORK_COMMAND = 0x0800, ///< execute the command without sending it on the network |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
319 |
CMD_NO_TEST_IF_IN_NETWORK = 0x1000, ///< When enabled, the command will bypass the no-DC_EXEC round if in network |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
320 |
CMD_SHOW_NO_ERROR = 0x2000, ///< do not show the error message |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
321 |
}; |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
322 |
|
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
323 |
/** |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
324 |
* Command flags for the command table _command_proc_table. |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
325 |
* |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
326 |
* This enumeration defines flags for the _command_proc_table. |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
327 |
*/ |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
328 |
enum { |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
329 |
CMD_SERVER = 0x1, ///< the command can only be initiated by the server |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
330 |
CMD_OFFLINE = 0x2, ///< the command cannot be executed in a multiplayer game; single-player only |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
331 |
CMD_AUTO = 0x4, ///< set the DC_AUTO flag on this command |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
332 |
}; |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
333 |
|
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
334 |
/** |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
335 |
* Defines the callback type for all command handler functions. |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
336 |
* |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
337 |
* This type defines the function header for all functions which handles a CMD_* command. |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
338 |
* A command handler use the parameters to act according to the meaning of the command. |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
339 |
* The tile parameter defines the tile to perform an action on. |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
340 |
* The flag parameter is filled with flags from the DC_* enumeration. The parameters |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
341 |
* p1 and p2 are filled with parameters for the command like "which road type", "which |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
342 |
* order" or "direction". Each function should mentioned in there doxygen comments |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
343 |
* the usage of these parameters. |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
344 |
* |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
345 |
* @param tile The tile to apply a command on |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
346 |
* @param flags Flags for the command, from the DC_* enumeration |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
347 |
* @param p1 Additional data for the command |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
348 |
* @param p2 Additional data for the command |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
349 |
* @return The CommandCost of the command, which can be succeeded or failed. |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
350 |
*/ |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
351 |
typedef CommandCost CommandProc(TileIndex tile, uint32 flags, uint32 p1, uint32 p2); |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
352 |
|
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
353 |
/** |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
354 |
* Define a command with the flags which belongs to it. |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
355 |
* |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
356 |
* This struct connect a command handler function with the flags created with |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
357 |
* the #CMD_AUTO, #CMD_OFFLINE and #CMD_SERVER values. |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
358 |
*/ |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
359 |
struct Command { |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
360 |
CommandProc *proc; |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
361 |
byte flags; |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
362 |
}; |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
363 |
|
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
364 |
/** |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
365 |
* Define a callback function for the client, after the command is finished. |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
366 |
* |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
367 |
* Functions of this type are called after the command is finished. The parameters |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
368 |
* are from the #CommandProc callback type. The boolean parameter indicates if the |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
369 |
* command succeeded or failed. |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
370 |
* |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
371 |
* @param success If the command succeeded or not. |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
372 |
* @param tile The tile of the command action |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
373 |
* @param p1 Additional data of the command |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
374 |
* @param p1 Additional data of the command |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
375 |
* @see CommandProc |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
376 |
*/ |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
377 |
typedef void CommandCallback(bool success, TileIndex tile, uint32 p1, uint32 p2); |
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
378 |
|
8da76dcb3287
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
diff
changeset
|
379 |
#endif /* COMMAND_TYPE_H */ |