src/order_type.h
author rubidium
Fri, 04 Jul 2008 19:00:11 +0000
changeset 11118 f66e0a4ce878
parent 10139 448ed1614a14
permissions -rw-r--r--
(svn r13676) -Fix [FS#2126]: inactive companies from old (TTD) saves could be marked active in some cases, which then loads garbage in their statistics and such.
2186
461a2aff3486 (svn r2701) Insert Id tags into all source files
tron
parents: 2159
diff changeset
     1
/* $Id$ */
461a2aff3486 (svn r2701) Insert Id tags into all source files
tron
parents: 2159
diff changeset
     2
9267
71cf88230dc1 (svn r12470) -Codechange: split order related types from order.h (and openttd.h) to order_type.h.
rubidium
parents: 9266
diff changeset
     3
/** @file order_type.h Types related to orders. */
1024
9b06b01490a4 (svn r1525) -Codechange: rewrote the _order_array, now it can be made dynamic.
truelight
parents:
diff changeset
     4
9267
71cf88230dc1 (svn r12470) -Codechange: split order related types from order.h (and openttd.h) to order_type.h.
rubidium
parents: 9266
diff changeset
     5
#ifndef ORDER_TYPE_H
71cf88230dc1 (svn r12470) -Codechange: split order related types from order.h (and openttd.h) to order_type.h.
rubidium
parents: 9266
diff changeset
     6
#define ORDER_TYPE_H
1314
d6a253cf92c3 (svn r1818) -Add: Dynamic orders (up to 64k orders)
truelight
parents: 1093
diff changeset
     7
9267
71cf88230dc1 (svn r12470) -Codechange: split order related types from order.h (and openttd.h) to order_type.h.
rubidium
parents: 9266
diff changeset
     8
#include "core/enum_type.hpp"
71cf88230dc1 (svn r12470) -Codechange: split order related types from order.h (and openttd.h) to order_type.h.
rubidium
parents: 9266
diff changeset
     9
71cf88230dc1 (svn r12470) -Codechange: split order related types from order.h (and openttd.h) to order_type.h.
rubidium
parents: 9266
diff changeset
    10
typedef byte VehicleOrderID;  ///< The index of an order within its current vehicle (not pool related)
71cf88230dc1 (svn r12470) -Codechange: split order related types from order.h (and openttd.h) to order_type.h.
rubidium
parents: 9266
diff changeset
    11
typedef uint16 OrderID;
9272
83630e52b5fe (svn r12475) -Codechange: cleanup coding style in news_gui.cpp.
rubidium
parents: 9267
diff changeset
    12
typedef uint16 DestinationID;
9263
0f1ba0ce5839 (svn r12466) -Codechange: move DestinationID to a more logical location.
rubidium
parents: 9146
diff changeset
    13
4408
84ec2899adfa (svn r6161) -Feature: List of vehicles with the same shared orders
bjarni
parents: 4392
diff changeset
    14
enum {
4712
273ec3b182bf (svn r6624) -Feature: added ability to add refit commands to vehicle orders (can only be done in goto depot orders)
bjarni
parents: 4549
diff changeset
    15
	INVALID_VEH_ORDER_ID = 0xFF,
4408
84ec2899adfa (svn r6161) -Feature: List of vehicles with the same shared orders
bjarni
parents: 4392
diff changeset
    16
};
84ec2899adfa (svn r6161) -Feature: List of vehicles with the same shared orders
bjarni
parents: 4392
diff changeset
    17
5838
9c3129cb019b (svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents: 5726
diff changeset
    18
static const OrderID INVALID_ORDER = 0xFFFF;
9c3129cb019b (svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents: 5726
diff changeset
    19
1024
9b06b01490a4 (svn r1525) -Codechange: rewrote the _order_array, now it can be made dynamic.
truelight
parents:
diff changeset
    20
/* Order types */
5838
9c3129cb019b (svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents: 5726
diff changeset
    21
enum OrderType {
9c3129cb019b (svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents: 5726
diff changeset
    22
	OT_BEGIN         = 0,
1024
9b06b01490a4 (svn r1525) -Codechange: rewrote the _order_array, now it can be made dynamic.
truelight
parents:
diff changeset
    23
	OT_NOTHING       = 0,
9b06b01490a4 (svn r1525) -Codechange: rewrote the _order_array, now it can be made dynamic.
truelight
parents:
diff changeset
    24
	OT_GOTO_STATION  = 1,
9b06b01490a4 (svn r1525) -Codechange: rewrote the _order_array, now it can be made dynamic.
truelight
parents:
diff changeset
    25
	OT_GOTO_DEPOT    = 2,
9b06b01490a4 (svn r1525) -Codechange: rewrote the _order_array, now it can be made dynamic.
truelight
parents:
diff changeset
    26
	OT_LOADING       = 3,
9b06b01490a4 (svn r1525) -Codechange: rewrote the _order_array, now it can be made dynamic.
truelight
parents:
diff changeset
    27
	OT_LEAVESTATION  = 4,
9b06b01490a4 (svn r1525) -Codechange: rewrote the _order_array, now it can be made dynamic.
truelight
parents:
diff changeset
    28
	OT_DUMMY         = 5,
4421
edb874ed70b1 (svn r6176) -Fix r6052: I assumed an typedefd enum would be an uint8, which is a really stupid thing to assume.
truelight
parents: 4414
diff changeset
    29
	OT_GOTO_WAYPOINT = 6,
10136
d808af13bf7a (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 10130
diff changeset
    30
	OT_CONDITIONAL   = 7,
5838
9c3129cb019b (svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents: 5726
diff changeset
    31
	OT_END
4421
edb874ed70b1 (svn r6176) -Fix r6052: I assumed an typedefd enum would be an uint8, which is a really stupid thing to assume.
truelight
parents: 4414
diff changeset
    32
};
5838
9c3129cb019b (svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents: 5726
diff changeset
    33
4421
edb874ed70b1 (svn r6176) -Fix r6052: I assumed an typedefd enum would be an uint8, which is a really stupid thing to assume.
truelight
parents: 4414
diff changeset
    34
/* It needs to be 8bits, because we save and load it as such */
5838
9c3129cb019b (svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents: 5726
diff changeset
    35
/** Define basic enum properties */
9c3129cb019b (svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents: 5726
diff changeset
    36
template <> struct EnumPropsT<OrderType> : MakeEnumPropsT<OrderType, byte, OT_BEGIN, OT_END, OT_END> {};
9c3129cb019b (svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents: 5726
diff changeset
    37
typedef TinyEnumT<OrderType> OrderTypeByte;
9c3129cb019b (svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents: 5726
diff changeset
    38
1024
9b06b01490a4 (svn r1525) -Codechange: rewrote the _order_array, now it can be made dynamic.
truelight
parents:
diff changeset
    39
10081
e46b9eb2f9c1 (svn r12617) -Codechange: add type safety to the Order's load and unload types.
rubidium
parents: 10079
diff changeset
    40
/**
e46b9eb2f9c1 (svn r12617) -Codechange: add type safety to the Order's load and unload types.
rubidium
parents: 10079
diff changeset
    41
 * Flags related to the unloading order.
e46b9eb2f9c1 (svn r12617) -Codechange: add type safety to the Order's load and unload types.
rubidium
parents: 10079
diff changeset
    42
 */
e46b9eb2f9c1 (svn r12617) -Codechange: add type safety to the Order's load and unload types.
rubidium
parents: 10079
diff changeset
    43
enum OrderUnloadFlags {
e46b9eb2f9c1 (svn r12617) -Codechange: add type safety to the Order's load and unload types.
rubidium
parents: 10079
diff changeset
    44
	OUF_UNLOAD_IF_POSSIBLE = 0,      ///< Unload all cargo that the station accepts.
10117
6a796f06bff4 (svn r12648) -Feature: allow four different non-stop types in a single game instead of two. The "TTDP compatible order" setting now only sets the default behaviour of new trains.
rubidium
parents: 10112
diff changeset
    45
	OUFB_UNLOAD            = 1 << 0, ///< Force unloading all cargo onto the platform, possibly not getting paid.
6a796f06bff4 (svn r12648) -Feature: allow four different non-stop types in a single game instead of two. The "TTDP compatible order" setting now only sets the default behaviour of new trains.
rubidium
parents: 10112
diff changeset
    46
	OUFB_TRANSFER          = 1 << 1, ///< Transfer all cargo onto the platform.
10112
4cff0d575f0b (svn r12643) -Codechange: be more explicit about the orders a vehicle has (non stop and full load are ambiguous and depend on some patch settings).
rubidium
parents: 10109
diff changeset
    47
	OUFB_NO_UNLOAD         = 1 << 2, ///< Totally no unloading will be done.
10081
e46b9eb2f9c1 (svn r12617) -Codechange: add type safety to the Order's load and unload types.
rubidium
parents: 10079
diff changeset
    48
};
1615
cee18da24b41 (svn r2119) - Fix: [ 1172878 ] Trains "Go to depot" button: click twice skip to next order (patch by Loic GUILLOUX). I also added short explanation of OF_/OFB_ difference to order.h.
pasky
parents: 1530
diff changeset
    49
10081
e46b9eb2f9c1 (svn r12617) -Codechange: add type safety to the Order's load and unload types.
rubidium
parents: 10079
diff changeset
    50
/**
e46b9eb2f9c1 (svn r12617) -Codechange: add type safety to the Order's load and unload types.
rubidium
parents: 10079
diff changeset
    51
 * Flags related to the loading order.
e46b9eb2f9c1 (svn r12617) -Codechange: add type safety to the Order's load and unload types.
rubidium
parents: 10079
diff changeset
    52
 */
e46b9eb2f9c1 (svn r12617) -Codechange: add type safety to the Order's load and unload types.
rubidium
parents: 10079
diff changeset
    53
enum OrderLoadFlags {
e46b9eb2f9c1 (svn r12617) -Codechange: add type safety to the Order's load and unload types.
rubidium
parents: 10079
diff changeset
    54
	OLF_LOAD_IF_POSSIBLE = 0,      ///< Load as long as there is cargo that fits in the train.
10117
6a796f06bff4 (svn r12648) -Feature: allow four different non-stop types in a single game instead of two. The "TTDP compatible order" setting now only sets the default behaviour of new trains.
rubidium
parents: 10112
diff changeset
    55
	OLFB_FULL_LOAD       = 1 << 1, ///< Full load the complete the consist.
6a796f06bff4 (svn r12648) -Feature: allow four different non-stop types in a single game instead of two. The "TTDP compatible order" setting now only sets the default behaviour of new trains.
rubidium
parents: 10112
diff changeset
    56
	OLF_FULL_LOAD_ANY    = 3,      ///< Full load the a single cargo of the consist.
10119
9b29b2296969 (svn r12650) -Feature: ability to force a vehicle to not load at a station.
rubidium
parents: 10117
diff changeset
    57
	OLFB_NO_LOAD         = 4,      ///< Do not load anything.
9344
1be7ac6bd504 (svn r12600) -Codechange: make GetNonStopType return a more augmented type; not is there a non-stop order but the kind of non-stop order, so one doesn't need to check _patches.new_nonstop type everywhere.
rubidium
parents: 9339
diff changeset
    58
};
1530
caa16c506a22 (svn r2034) -Codechange: Replaced the rather meaningless LOAD and UNLOAD flags for depots by something more meaningful
celestar
parents: 1314
diff changeset
    59
9344
1be7ac6bd504 (svn r12600) -Codechange: make GetNonStopType return a more augmented type; not is there a non-stop order but the kind of non-stop order, so one doesn't need to check _patches.new_nonstop type everywhere.
rubidium
parents: 9339
diff changeset
    60
/**
1be7ac6bd504 (svn r12600) -Codechange: make GetNonStopType return a more augmented type; not is there a non-stop order but the kind of non-stop order, so one doesn't need to check _patches.new_nonstop type everywhere.
rubidium
parents: 9339
diff changeset
    61
 * Non-stop order flags.
1be7ac6bd504 (svn r12600) -Codechange: make GetNonStopType return a more augmented type; not is there a non-stop order but the kind of non-stop order, so one doesn't need to check _patches.new_nonstop type everywhere.
rubidium
parents: 9339
diff changeset
    62
 */
1be7ac6bd504 (svn r12600) -Codechange: make GetNonStopType return a more augmented type; not is there a non-stop order but the kind of non-stop order, so one doesn't need to check _patches.new_nonstop type everywhere.
rubidium
parents: 9339
diff changeset
    63
enum OrderNonStopFlags {
10081
e46b9eb2f9c1 (svn r12617) -Codechange: add type safety to the Order's load and unload types.
rubidium
parents: 10079
diff changeset
    64
	ONSF_STOP_EVERYWHERE                  = 0, ///< The vehicle will stop at any station it passes and the destination.
e46b9eb2f9c1 (svn r12617) -Codechange: add type safety to the Order's load and unload types.
rubidium
parents: 10079
diff changeset
    65
	ONSF_NO_STOP_AT_INTERMEDIATE_STATIONS = 1, ///< The vehicle will not stop at any stations it passes except the destination.
e46b9eb2f9c1 (svn r12617) -Codechange: add type safety to the Order's load and unload types.
rubidium
parents: 10079
diff changeset
    66
	ONSF_NO_STOP_AT_DESTINATION_STATION   = 2, ///< The vehicle will stop at any station it passes except the destination.
e46b9eb2f9c1 (svn r12617) -Codechange: add type safety to the Order's load and unload types.
rubidium
parents: 10079
diff changeset
    67
	ONSF_NO_STOP_AT_ANY_STATION           = 3, ///< The vehicle will not stop at any stations it passes including the destination.
10105
f0d50efea303 (svn r12636) -Codechange: make CmdModifyOrder a little more flexible and remove 'hack' that used the full load flag to set the service if needed flag.
rubidium
parents: 10081
diff changeset
    68
	ONSF_END
1024
9b06b01490a4 (svn r1525) -Codechange: rewrote the _order_array, now it can be made dynamic.
truelight
parents:
diff changeset
    69
};
9b06b01490a4 (svn r1525) -Codechange: rewrote the _order_array, now it can be made dynamic.
truelight
parents:
diff changeset
    70
10079
99aba130db3c (svn r12615) -Codechange: rename some enums related to depot orders to make it more clear that they are no loading/unloading flags. Also add more type strictness.
rubidium
parents: 9344
diff changeset
    71
/**
99aba130db3c (svn r12615) -Codechange: rename some enums related to depot orders to make it more clear that they are no loading/unloading flags. Also add more type strictness.
rubidium
parents: 9344
diff changeset
    72
 * Reasons that could cause us to go to the depot.
99aba130db3c (svn r12615) -Codechange: rename some enums related to depot orders to make it more clear that they are no loading/unloading flags. Also add more type strictness.
rubidium
parents: 9344
diff changeset
    73
 */
99aba130db3c (svn r12615) -Codechange: rename some enums related to depot orders to make it more clear that they are no loading/unloading flags. Also add more type strictness.
rubidium
parents: 9344
diff changeset
    74
enum OrderDepotTypeFlags {
99aba130db3c (svn r12615) -Codechange: rename some enums related to depot orders to make it more clear that they are no loading/unloading flags. Also add more type strictness.
rubidium
parents: 9344
diff changeset
    75
	ODTF_MANUAL          = 0,      ///< The player initiated this order manually.
10117
6a796f06bff4 (svn r12648) -Feature: allow four different non-stop types in a single game instead of two. The "TTDP compatible order" setting now only sets the default behaviour of new trains.
rubidium
parents: 10112
diff changeset
    76
	ODTFB_SERVICE        = 1 << 0, ///< This depot order is because of the servicing limit.
10079
99aba130db3c (svn r12615) -Codechange: rename some enums related to depot orders to make it more clear that they are no loading/unloading flags. Also add more type strictness.
rubidium
parents: 9344
diff changeset
    77
	ODTFB_PART_OF_ORDERS = 1 << 1, ///< This depot order is because of a regular order.
99aba130db3c (svn r12615) -Codechange: rename some enums related to depot orders to make it more clear that they are no loading/unloading flags. Also add more type strictness.
rubidium
parents: 9344
diff changeset
    78
};
99aba130db3c (svn r12615) -Codechange: rename some enums related to depot orders to make it more clear that they are no loading/unloading flags. Also add more type strictness.
rubidium
parents: 9344
diff changeset
    79
99aba130db3c (svn r12615) -Codechange: rename some enums related to depot orders to make it more clear that they are no loading/unloading flags. Also add more type strictness.
rubidium
parents: 9344
diff changeset
    80
/**
99aba130db3c (svn r12615) -Codechange: rename some enums related to depot orders to make it more clear that they are no loading/unloading flags. Also add more type strictness.
rubidium
parents: 9344
diff changeset
    81
 * Actions that can be performed when the vehicle enters the depot.
99aba130db3c (svn r12615) -Codechange: rename some enums related to depot orders to make it more clear that they are no loading/unloading flags. Also add more type strictness.
rubidium
parents: 9344
diff changeset
    82
 */
99aba130db3c (svn r12615) -Codechange: rename some enums related to depot orders to make it more clear that they are no loading/unloading flags. Also add more type strictness.
rubidium
parents: 9344
diff changeset
    83
enum OrderDepotActionFlags {
99aba130db3c (svn r12615) -Codechange: rename some enums related to depot orders to make it more clear that they are no loading/unloading flags. Also add more type strictness.
rubidium
parents: 9344
diff changeset
    84
	ODATF_SERVICE_ONLY   = 0,      ///< Only service the vehicle.
10117
6a796f06bff4 (svn r12648) -Feature: allow four different non-stop types in a single game instead of two. The "TTDP compatible order" setting now only sets the default behaviour of new trains.
rubidium
parents: 10112
diff changeset
    85
	ODATFB_HALT          = 1 << 0, ///< Service the vehicle and then halt it.
10130
906ffae618b0 (svn r12661) -Add: ability to send a vehicle (using default orders) to the nearest depot.
rubidium
parents: 10119
diff changeset
    86
	ODATFB_NEAREST_DEPOT = 1 << 1, ///< Send the vehicle to the nearest depot.
10079
99aba130db3c (svn r12615) -Codechange: rename some enums related to depot orders to make it more clear that they are no loading/unloading flags. Also add more type strictness.
rubidium
parents: 9344
diff changeset
    87
};
99aba130db3c (svn r12615) -Codechange: rename some enums related to depot orders to make it more clear that they are no loading/unloading flags. Also add more type strictness.
rubidium
parents: 9344
diff changeset
    88
10081
e46b9eb2f9c1 (svn r12617) -Codechange: add type safety to the Order's load and unload types.
rubidium
parents: 10079
diff changeset
    89
/**
10136
d808af13bf7a (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 10130
diff changeset
    90
 * Variables (of a vehicle) to 'cause' skipping on.
d808af13bf7a (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 10130
diff changeset
    91
 */
d808af13bf7a (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 10130
diff changeset
    92
enum OrderConditionVariable {
d808af13bf7a (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 10130
diff changeset
    93
	OCV_LOAD_PERCENTAGE,  ///< Skip based on the amount of load
d808af13bf7a (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 10130
diff changeset
    94
	OCV_RELIABILITY,      ///< Skip based on the reliability
d808af13bf7a (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 10130
diff changeset
    95
	OCV_MAX_SPEED,        ///< Skip based on the maximum speed
d808af13bf7a (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 10130
diff changeset
    96
	OCV_AGE,              ///< Skip based on the age
d808af13bf7a (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 10130
diff changeset
    97
	OCV_REQUIRES_SERVICE, ///< Skip when the vehicle requires service
10139
448ed1614a14 (svn r12670) -Add: unconditional/always order 'jump/skip' variable.
rubidium
parents: 10136
diff changeset
    98
	OCV_UNCONDITIONALLY,  ///< Always skip
10136
d808af13bf7a (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 10130
diff changeset
    99
	OCV_END
d808af13bf7a (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 10130
diff changeset
   100
};
d808af13bf7a (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 10130
diff changeset
   101
d808af13bf7a (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 10130
diff changeset
   102
/**
d808af13bf7a (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 10130
diff changeset
   103
 * Comparator for the skip reasoning.
d808af13bf7a (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 10130
diff changeset
   104
 */
d808af13bf7a (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 10130
diff changeset
   105
enum OrderConditionComparator {
d808af13bf7a (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 10130
diff changeset
   106
	OCC_EQUALS,      ///< Skip if both values are equal
d808af13bf7a (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 10130
diff changeset
   107
	OCC_NOT_EQUALS,  ///< Skip if both values are not equal
d808af13bf7a (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 10130
diff changeset
   108
	OCC_LESS_THAN,   ///< Skip if the value is less than the limit
d808af13bf7a (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 10130
diff changeset
   109
	OCC_LESS_EQUALS, ///< Skip if the value is less or equal to the limit
d808af13bf7a (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 10130
diff changeset
   110
	OCC_MORE_THAN,   ///< Skip if the value is more than the limit
d808af13bf7a (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 10130
diff changeset
   111
	OCC_MORE_EQUALS, ///< Skip if the value is more or equal to the limit
d808af13bf7a (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 10130
diff changeset
   112
	OCC_IS_TRUE,     ///< Skip if the variable is true
d808af13bf7a (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 10130
diff changeset
   113
	OCC_IS_FALSE,    ///< Skip if the variable is false
d808af13bf7a (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 10130
diff changeset
   114
	OCC_END
d808af13bf7a (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 10130
diff changeset
   115
};
d808af13bf7a (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 10130
diff changeset
   116
d808af13bf7a (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 10130
diff changeset
   117
d808af13bf7a (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 10130
diff changeset
   118
/**
10105
f0d50efea303 (svn r12636) -Codechange: make CmdModifyOrder a little more flexible and remove 'hack' that used the full load flag to set the service if needed flag.
rubidium
parents: 10081
diff changeset
   119
 * Enumeration for the data to set in CmdModifyOrder.
4077
d3022f976946 (svn r5391) Miscellaneous, mostly bracing and whitespace, nothing spectacular
tron
parents: 3347
diff changeset
   120
 */
10105
f0d50efea303 (svn r12636) -Codechange: make CmdModifyOrder a little more flexible and remove 'hack' that used the full load flag to set the service if needed flag.
rubidium
parents: 10081
diff changeset
   121
enum ModifyOrderFlags {
10136
d808af13bf7a (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 10130
diff changeset
   122
	MOF_NON_STOP,        ///< Passes a OrderNonStopFlags.
d808af13bf7a (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 10130
diff changeset
   123
	MOF_UNLOAD,          ///< Passes an OrderUnloadType.
d808af13bf7a (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 10130
diff changeset
   124
	MOF_LOAD,            ///< Passes an OrderLoadType
d808af13bf7a (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 10130
diff changeset
   125
	MOF_DEPOT_ACTION,    ///< Toggle the 'service' if needed flag.
d808af13bf7a (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 10130
diff changeset
   126
	MOF_COND_VARIABLE,   ///< A conditional variable changes.
d808af13bf7a (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 10130
diff changeset
   127
	MOF_COND_COMPARATOR, ///< A comparator changes.
d808af13bf7a (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 10130
diff changeset
   128
	MOF_COND_VALUE,      ///< The value to set the condition to.
d808af13bf7a (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 10130
diff changeset
   129
	MOF_END
1024
9b06b01490a4 (svn r1525) -Codechange: rewrote the _order_array, now it can be made dynamic.
truelight
parents:
diff changeset
   130
};
9b06b01490a4 (svn r1525) -Codechange: rewrote the _order_array, now it can be made dynamic.
truelight
parents:
diff changeset
   131
1615
cee18da24b41 (svn r2119) - Fix: [ 1172878 ] Trains "Go to depot" button: click twice skip to next order (patch by Loic GUILLOUX). I also added short explanation of OF_/OFB_ difference to order.h.
pasky
parents: 1530
diff changeset
   132
1024
9b06b01490a4 (svn r1525) -Codechange: rewrote the _order_array, now it can be made dynamic.
truelight
parents:
diff changeset
   133
/* Possible clone options */
9b06b01490a4 (svn r1525) -Codechange: rewrote the _order_array, now it can be made dynamic.
truelight
parents:
diff changeset
   134
enum {
9b06b01490a4 (svn r1525) -Codechange: rewrote the _order_array, now it can be made dynamic.
truelight
parents:
diff changeset
   135
	CO_SHARE   = 0,
9b06b01490a4 (svn r1525) -Codechange: rewrote the _order_array, now it can be made dynamic.
truelight
parents:
diff changeset
   136
	CO_COPY    = 1,
9b06b01490a4 (svn r1525) -Codechange: rewrote the _order_array, now it can be made dynamic.
truelight
parents:
diff changeset
   137
	CO_UNSHARE = 2
9b06b01490a4 (svn r1525) -Codechange: rewrote the _order_array, now it can be made dynamic.
truelight
parents:
diff changeset
   138
};
9b06b01490a4 (svn r1525) -Codechange: rewrote the _order_array, now it can be made dynamic.
truelight
parents:
diff changeset
   139
7887
5740662fc5ce (svn r10760) -Codechange: make the order struct use the pool item class as super class.
rubidium
parents: 7871
diff changeset
   140
struct Order;
4384
293c0d26294c (svn r6137) -Codechange: some very minor cleanups:
truelight
parents: 4354
diff changeset
   141
9267
71cf88230dc1 (svn r12470) -Codechange: split order related types from order.h (and openttd.h) to order_type.h.
rubidium
parents: 9266
diff changeset
   142
#endif /* ORDER_TYPE_H */