src/order_type.h
author rubidium
Wed, 03 Dec 2008 00:19:06 +0000
changeset 10400 03e9c6b00a00
parent 10285 82fa43e7b8f3
permissions -rw-r--r--
(svn r14651) -Fix [FS#2437] (r14636): extmidi wasn't compiled/linked anymore.
8771
cab6fdd47703 (svn r12470) -Codechange: split order related types from order.h (and openttd.h) to order_type.h.
rubidium
parents:
diff changeset
     1
/* $Id$ */
cab6fdd47703 (svn r12470) -Codechange: split order related types from order.h (and openttd.h) to order_type.h.
rubidium
parents:
diff changeset
     2
cab6fdd47703 (svn r12470) -Codechange: split order related types from order.h (and openttd.h) to order_type.h.
rubidium
parents:
diff changeset
     3
/** @file order_type.h Types related to orders. */
cab6fdd47703 (svn r12470) -Codechange: split order related types from order.h (and openttd.h) to order_type.h.
rubidium
parents:
diff changeset
     4
cab6fdd47703 (svn r12470) -Codechange: split order related types from order.h (and openttd.h) to order_type.h.
rubidium
parents:
diff changeset
     5
#ifndef ORDER_TYPE_H
cab6fdd47703 (svn r12470) -Codechange: split order related types from order.h (and openttd.h) to order_type.h.
rubidium
parents:
diff changeset
     6
#define ORDER_TYPE_H
cab6fdd47703 (svn r12470) -Codechange: split order related types from order.h (and openttd.h) to order_type.h.
rubidium
parents:
diff changeset
     7
cab6fdd47703 (svn r12470) -Codechange: split order related types from order.h (and openttd.h) to order_type.h.
rubidium
parents:
diff changeset
     8
#include "core/enum_type.hpp"
cab6fdd47703 (svn r12470) -Codechange: split order related types from order.h (and openttd.h) to order_type.h.
rubidium
parents:
diff changeset
     9
cab6fdd47703 (svn r12470) -Codechange: split order related types from order.h (and openttd.h) to order_type.h.
rubidium
parents:
diff changeset
    10
typedef byte VehicleOrderID;  ///< The index of an order within its current vehicle (not pool related)
cab6fdd47703 (svn r12470) -Codechange: split order related types from order.h (and openttd.h) to order_type.h.
rubidium
parents:
diff changeset
    11
typedef uint16 OrderID;
8776
1db57a00cba8 (svn r12475) -Codechange: cleanup coding style in news_gui.cpp.
rubidium
parents: 8771
diff changeset
    12
typedef uint16 DestinationID;
8771
cab6fdd47703 (svn r12470) -Codechange: split order related types from order.h (and openttd.h) to order_type.h.
rubidium
parents:
diff changeset
    13
cab6fdd47703 (svn r12470) -Codechange: split order related types from order.h (and openttd.h) to order_type.h.
rubidium
parents:
diff changeset
    14
enum {
cab6fdd47703 (svn r12470) -Codechange: split order related types from order.h (and openttd.h) to order_type.h.
rubidium
parents:
diff changeset
    15
	INVALID_VEH_ORDER_ID = 0xFF,
cab6fdd47703 (svn r12470) -Codechange: split order related types from order.h (and openttd.h) to order_type.h.
rubidium
parents:
diff changeset
    16
};
cab6fdd47703 (svn r12470) -Codechange: split order related types from order.h (and openttd.h) to order_type.h.
rubidium
parents:
diff changeset
    17
cab6fdd47703 (svn r12470) -Codechange: split order related types from order.h (and openttd.h) to order_type.h.
rubidium
parents:
diff changeset
    18
static const OrderID INVALID_ORDER = 0xFFFF;
cab6fdd47703 (svn r12470) -Codechange: split order related types from order.h (and openttd.h) to order_type.h.
rubidium
parents:
diff changeset
    19
cab6fdd47703 (svn r12470) -Codechange: split order related types from order.h (and openttd.h) to order_type.h.
rubidium
parents:
diff changeset
    20
/* Order types */
cab6fdd47703 (svn r12470) -Codechange: split order related types from order.h (and openttd.h) to order_type.h.
rubidium
parents:
diff changeset
    21
enum OrderType {
cab6fdd47703 (svn r12470) -Codechange: split order related types from order.h (and openttd.h) to order_type.h.
rubidium
parents:
diff changeset
    22
	OT_BEGIN         = 0,
cab6fdd47703 (svn r12470) -Codechange: split order related types from order.h (and openttd.h) to order_type.h.
rubidium
parents:
diff changeset
    23
	OT_NOTHING       = 0,
cab6fdd47703 (svn r12470) -Codechange: split order related types from order.h (and openttd.h) to order_type.h.
rubidium
parents:
diff changeset
    24
	OT_GOTO_STATION  = 1,
cab6fdd47703 (svn r12470) -Codechange: split order related types from order.h (and openttd.h) to order_type.h.
rubidium
parents:
diff changeset
    25
	OT_GOTO_DEPOT    = 2,
cab6fdd47703 (svn r12470) -Codechange: split order related types from order.h (and openttd.h) to order_type.h.
rubidium
parents:
diff changeset
    26
	OT_LOADING       = 3,
cab6fdd47703 (svn r12470) -Codechange: split order related types from order.h (and openttd.h) to order_type.h.
rubidium
parents:
diff changeset
    27
	OT_LEAVESTATION  = 4,
cab6fdd47703 (svn r12470) -Codechange: split order related types from order.h (and openttd.h) to order_type.h.
rubidium
parents:
diff changeset
    28
	OT_DUMMY         = 5,
cab6fdd47703 (svn r12470) -Codechange: split order related types from order.h (and openttd.h) to order_type.h.
rubidium
parents:
diff changeset
    29
	OT_GOTO_WAYPOINT = 6,
8900
a49f442299b8 (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 8894
diff changeset
    30
	OT_CONDITIONAL   = 7,
8771
cab6fdd47703 (svn r12470) -Codechange: split order related types from order.h (and openttd.h) to order_type.h.
rubidium
parents:
diff changeset
    31
	OT_END
cab6fdd47703 (svn r12470) -Codechange: split order related types from order.h (and openttd.h) to order_type.h.
rubidium
parents:
diff changeset
    32
};
cab6fdd47703 (svn r12470) -Codechange: split order related types from order.h (and openttd.h) to order_type.h.
rubidium
parents:
diff changeset
    33
cab6fdd47703 (svn r12470) -Codechange: split order related types from order.h (and openttd.h) to order_type.h.
rubidium
parents:
diff changeset
    34
/* It needs to be 8bits, because we save and load it as such */
cab6fdd47703 (svn r12470) -Codechange: split order related types from order.h (and openttd.h) to order_type.h.
rubidium
parents:
diff changeset
    35
/** Define basic enum properties */
cab6fdd47703 (svn r12470) -Codechange: split order related types from order.h (and openttd.h) to order_type.h.
rubidium
parents:
diff changeset
    36
template <> struct EnumPropsT<OrderType> : MakeEnumPropsT<OrderType, byte, OT_BEGIN, OT_END, OT_END> {};
cab6fdd47703 (svn r12470) -Codechange: split order related types from order.h (and openttd.h) to order_type.h.
rubidium
parents:
diff changeset
    37
typedef TinyEnumT<OrderType> OrderTypeByte;
cab6fdd47703 (svn r12470) -Codechange: split order related types from order.h (and openttd.h) to order_type.h.
rubidium
parents:
diff changeset
    38
cab6fdd47703 (svn r12470) -Codechange: split order related types from order.h (and openttd.h) to order_type.h.
rubidium
parents:
diff changeset
    39
8855
6d841d5d4789 (svn r12617) -Codechange: add type safety to the Order's load and unload types.
rubidium
parents: 8853
diff changeset
    40
/**
6d841d5d4789 (svn r12617) -Codechange: add type safety to the Order's load and unload types.
rubidium
parents: 8853
diff changeset
    41
 * Flags related to the unloading order.
6d841d5d4789 (svn r12617) -Codechange: add type safety to the Order's load and unload types.
rubidium
parents: 8853
diff changeset
    42
 */
6d841d5d4789 (svn r12617) -Codechange: add type safety to the Order's load and unload types.
rubidium
parents: 8853
diff changeset
    43
enum OrderUnloadFlags {
6d841d5d4789 (svn r12617) -Codechange: add type safety to the Order's load and unload types.
rubidium
parents: 8853
diff changeset
    44
	OUF_UNLOAD_IF_POSSIBLE = 0,      ///< Unload all cargo that the station accepts.
8881
ad608e8305ad (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: 8876
diff changeset
    45
	OUFB_UNLOAD            = 1 << 0, ///< Force unloading all cargo onto the platform, possibly not getting paid.
ad608e8305ad (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: 8876
diff changeset
    46
	OUFB_TRANSFER          = 1 << 1, ///< Transfer all cargo onto the platform.
8876
e5bf23efad87 (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: 8873
diff changeset
    47
	OUFB_NO_UNLOAD         = 1 << 2, ///< Totally no unloading will be done.
8855
6d841d5d4789 (svn r12617) -Codechange: add type safety to the Order's load and unload types.
rubidium
parents: 8853
diff changeset
    48
};
8771
cab6fdd47703 (svn r12470) -Codechange: split order related types from order.h (and openttd.h) to order_type.h.
rubidium
parents:
diff changeset
    49
8855
6d841d5d4789 (svn r12617) -Codechange: add type safety to the Order's load and unload types.
rubidium
parents: 8853
diff changeset
    50
/**
6d841d5d4789 (svn r12617) -Codechange: add type safety to the Order's load and unload types.
rubidium
parents: 8853
diff changeset
    51
 * Flags related to the loading order.
6d841d5d4789 (svn r12617) -Codechange: add type safety to the Order's load and unload types.
rubidium
parents: 8853
diff changeset
    52
 */
6d841d5d4789 (svn r12617) -Codechange: add type safety to the Order's load and unload types.
rubidium
parents: 8853
diff changeset
    53
enum OrderLoadFlags {
6d841d5d4789 (svn r12617) -Codechange: add type safety to the Order's load and unload types.
rubidium
parents: 8853
diff changeset
    54
	OLF_LOAD_IF_POSSIBLE = 0,      ///< Load as long as there is cargo that fits in the train.
8881
ad608e8305ad (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: 8876
diff changeset
    55
	OLFB_FULL_LOAD       = 1 << 1, ///< Full load the complete the consist.
ad608e8305ad (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: 8876
diff changeset
    56
	OLF_FULL_LOAD_ANY    = 3,      ///< Full load the a single cargo of the consist.
8883
baee554a9449 (svn r12650) -Feature: ability to force a vehicle to not load at a station.
rubidium
parents: 8881
diff changeset
    57
	OLFB_NO_LOAD         = 4,      ///< Do not load anything.
8848
635cb164edd4 (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: 8843
diff changeset
    58
};
8771
cab6fdd47703 (svn r12470) -Codechange: split order related types from order.h (and openttd.h) to order_type.h.
rubidium
parents:
diff changeset
    59
8848
635cb164edd4 (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: 8843
diff changeset
    60
/**
635cb164edd4 (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: 8843
diff changeset
    61
 * Non-stop order flags.
635cb164edd4 (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: 8843
diff changeset
    62
 */
635cb164edd4 (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: 8843
diff changeset
    63
enum OrderNonStopFlags {
8855
6d841d5d4789 (svn r12617) -Codechange: add type safety to the Order's load and unload types.
rubidium
parents: 8853
diff changeset
    64
	ONSF_STOP_EVERYWHERE                  = 0, ///< The vehicle will stop at any station it passes and the destination.
6d841d5d4789 (svn r12617) -Codechange: add type safety to the Order's load and unload types.
rubidium
parents: 8853
diff changeset
    65
	ONSF_NO_STOP_AT_INTERMEDIATE_STATIONS = 1, ///< The vehicle will not stop at any stations it passes except the destination.
6d841d5d4789 (svn r12617) -Codechange: add type safety to the Order's load and unload types.
rubidium
parents: 8853
diff changeset
    66
	ONSF_NO_STOP_AT_DESTINATION_STATION   = 2, ///< The vehicle will stop at any station it passes except the destination.
6d841d5d4789 (svn r12617) -Codechange: add type safety to the Order's load and unload types.
rubidium
parents: 8853
diff changeset
    67
	ONSF_NO_STOP_AT_ANY_STATION           = 3, ///< The vehicle will not stop at any stations it passes including the destination.
8869
8a3dac8dc505 (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: 8855
diff changeset
    68
	ONSF_END
8771
cab6fdd47703 (svn r12470) -Codechange: split order related types from order.h (and openttd.h) to order_type.h.
rubidium
parents:
diff changeset
    69
};
cab6fdd47703 (svn r12470) -Codechange: split order related types from order.h (and openttd.h) to order_type.h.
rubidium
parents:
diff changeset
    70
8853
3266f0374302 (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: 8848
diff changeset
    71
/**
3266f0374302 (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: 8848
diff changeset
    72
 * Reasons that could cause us to go to the depot.
3266f0374302 (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: 8848
diff changeset
    73
 */
3266f0374302 (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: 8848
diff changeset
    74
enum OrderDepotTypeFlags {
10207
c291a21b304e (svn r14421) -Codechange: rename all player variables/types to company *or* client so it is immediatelly clear which one you are working with.
rubidium
parents: 9665
diff changeset
    75
	ODTF_MANUAL          = 0,      ///< Manually initiated order.
8881
ad608e8305ad (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: 8876
diff changeset
    76
	ODTFB_SERVICE        = 1 << 0, ///< This depot order is because of the servicing limit.
8853
3266f0374302 (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: 8848
diff changeset
    77
	ODTFB_PART_OF_ORDERS = 1 << 1, ///< This depot order is because of a regular order.
3266f0374302 (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: 8848
diff changeset
    78
};
3266f0374302 (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: 8848
diff changeset
    79
3266f0374302 (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: 8848
diff changeset
    80
/**
3266f0374302 (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: 8848
diff changeset
    81
 * Actions that can be performed when the vehicle enters the depot.
3266f0374302 (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: 8848
diff changeset
    82
 */
3266f0374302 (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: 8848
diff changeset
    83
enum OrderDepotActionFlags {
3266f0374302 (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: 8848
diff changeset
    84
	ODATF_SERVICE_ONLY   = 0,      ///< Only service the vehicle.
8881
ad608e8305ad (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: 8876
diff changeset
    85
	ODATFB_HALT          = 1 << 0, ///< Service the vehicle and then halt it.
8894
66472a0a6eb2 (svn r12661) -Add: ability to send a vehicle (using default orders) to the nearest depot.
rubidium
parents: 8883
diff changeset
    86
	ODATFB_NEAREST_DEPOT = 1 << 1, ///< Send the vehicle to the nearest depot.
8853
3266f0374302 (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: 8848
diff changeset
    87
};
3266f0374302 (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: 8848
diff changeset
    88
8855
6d841d5d4789 (svn r12617) -Codechange: add type safety to the Order's load and unload types.
rubidium
parents: 8853
diff changeset
    89
/**
8900
a49f442299b8 (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 8894
diff changeset
    90
 * Variables (of a vehicle) to 'cause' skipping on.
a49f442299b8 (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 8894
diff changeset
    91
 */
a49f442299b8 (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 8894
diff changeset
    92
enum OrderConditionVariable {
a49f442299b8 (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 8894
diff changeset
    93
	OCV_LOAD_PERCENTAGE,  ///< Skip based on the amount of load
a49f442299b8 (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 8894
diff changeset
    94
	OCV_RELIABILITY,      ///< Skip based on the reliability
a49f442299b8 (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 8894
diff changeset
    95
	OCV_MAX_SPEED,        ///< Skip based on the maximum speed
a49f442299b8 (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 8894
diff changeset
    96
	OCV_AGE,              ///< Skip based on the age
a49f442299b8 (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 8894
diff changeset
    97
	OCV_REQUIRES_SERVICE, ///< Skip when the vehicle requires service
8903
04bcd0e7d4d6 (svn r12670) -Add: unconditional/always order 'jump/skip' variable.
rubidium
parents: 8900
diff changeset
    98
	OCV_UNCONDITIONALLY,  ///< Always skip
8900
a49f442299b8 (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 8894
diff changeset
    99
	OCV_END
a49f442299b8 (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 8894
diff changeset
   100
};
a49f442299b8 (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 8894
diff changeset
   101
a49f442299b8 (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 8894
diff changeset
   102
/**
a49f442299b8 (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 8894
diff changeset
   103
 * Comparator for the skip reasoning.
a49f442299b8 (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 8894
diff changeset
   104
 */
a49f442299b8 (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 8894
diff changeset
   105
enum OrderConditionComparator {
a49f442299b8 (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 8894
diff changeset
   106
	OCC_EQUALS,      ///< Skip if both values are equal
a49f442299b8 (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 8894
diff changeset
   107
	OCC_NOT_EQUALS,  ///< Skip if both values are not equal
a49f442299b8 (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 8894
diff changeset
   108
	OCC_LESS_THAN,   ///< Skip if the value is less than the limit
a49f442299b8 (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 8894
diff changeset
   109
	OCC_LESS_EQUALS, ///< Skip if the value is less or equal to the limit
a49f442299b8 (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 8894
diff changeset
   110
	OCC_MORE_THAN,   ///< Skip if the value is more than the limit
a49f442299b8 (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 8894
diff changeset
   111
	OCC_MORE_EQUALS, ///< Skip if the value is more or equal to the limit
a49f442299b8 (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 8894
diff changeset
   112
	OCC_IS_TRUE,     ///< Skip if the variable is true
a49f442299b8 (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 8894
diff changeset
   113
	OCC_IS_FALSE,    ///< Skip if the variable is false
a49f442299b8 (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 8894
diff changeset
   114
	OCC_END
a49f442299b8 (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 8894
diff changeset
   115
};
a49f442299b8 (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 8894
diff changeset
   116
a49f442299b8 (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 8894
diff changeset
   117
a49f442299b8 (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 8894
diff changeset
   118
/**
8869
8a3dac8dc505 (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: 8855
diff changeset
   119
 * Enumeration for the data to set in CmdModifyOrder.
8771
cab6fdd47703 (svn r12470) -Codechange: split order related types from order.h (and openttd.h) to order_type.h.
rubidium
parents:
diff changeset
   120
 */
8869
8a3dac8dc505 (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: 8855
diff changeset
   121
enum ModifyOrderFlags {
8900
a49f442299b8 (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 8894
diff changeset
   122
	MOF_NON_STOP,        ///< Passes a OrderNonStopFlags.
a49f442299b8 (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 8894
diff changeset
   123
	MOF_UNLOAD,          ///< Passes an OrderUnloadType.
a49f442299b8 (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 8894
diff changeset
   124
	MOF_LOAD,            ///< Passes an OrderLoadType
10285
82fa43e7b8f3 (svn r14524) -Add: stop-in-depot as part of orders (PhilSophus)
rubidium
parents: 10207
diff changeset
   125
	MOF_DEPOT_ACTION,    ///< Selects the OrderDepotAction
8900
a49f442299b8 (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 8894
diff changeset
   126
	MOF_COND_VARIABLE,   ///< A conditional variable changes.
a49f442299b8 (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 8894
diff changeset
   127
	MOF_COND_COMPARATOR, ///< A comparator changes.
a49f442299b8 (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 8894
diff changeset
   128
	MOF_COND_VALUE,      ///< The value to set the condition to.
9665
dd6c07db9d32 (svn r13752) -Fix [FS#2130]: correctly restore conditional orders when they are put 'into' backup.
rubidium
parents: 8903
diff changeset
   129
	MOF_COND_DESTINATION,///< Change the destination of a conditional order.
8900
a49f442299b8 (svn r12667) -Feature: conditional 'skip/jump' orders.
rubidium
parents: 8894
diff changeset
   130
	MOF_END
8771
cab6fdd47703 (svn r12470) -Codechange: split order related types from order.h (and openttd.h) to order_type.h.
rubidium
parents:
diff changeset
   131
};
cab6fdd47703 (svn r12470) -Codechange: split order related types from order.h (and openttd.h) to order_type.h.
rubidium
parents:
diff changeset
   132
10285
82fa43e7b8f3 (svn r14524) -Add: stop-in-depot as part of orders (PhilSophus)
rubidium
parents: 10207
diff changeset
   133
/**
82fa43e7b8f3 (svn r14524) -Add: stop-in-depot as part of orders (PhilSophus)
rubidium
parents: 10207
diff changeset
   134
 * Depot action to switch to when doing a MOF_DEPOT_ACTION.
82fa43e7b8f3 (svn r14524) -Add: stop-in-depot as part of orders (PhilSophus)
rubidium
parents: 10207
diff changeset
   135
 */
82fa43e7b8f3 (svn r14524) -Add: stop-in-depot as part of orders (PhilSophus)
rubidium
parents: 10207
diff changeset
   136
enum OrderDepotAction {
82fa43e7b8f3 (svn r14524) -Add: stop-in-depot as part of orders (PhilSophus)
rubidium
parents: 10207
diff changeset
   137
	DA_ALWAYS_GO, ///< Always go to the depot
82fa43e7b8f3 (svn r14524) -Add: stop-in-depot as part of orders (PhilSophus)
rubidium
parents: 10207
diff changeset
   138
	DA_SERVICE,   ///< Service only if needed
82fa43e7b8f3 (svn r14524) -Add: stop-in-depot as part of orders (PhilSophus)
rubidium
parents: 10207
diff changeset
   139
	DA_STOP,      ///< Go to the depot and stop there
82fa43e7b8f3 (svn r14524) -Add: stop-in-depot as part of orders (PhilSophus)
rubidium
parents: 10207
diff changeset
   140
	DA_END
82fa43e7b8f3 (svn r14524) -Add: stop-in-depot as part of orders (PhilSophus)
rubidium
parents: 10207
diff changeset
   141
};
82fa43e7b8f3 (svn r14524) -Add: stop-in-depot as part of orders (PhilSophus)
rubidium
parents: 10207
diff changeset
   142
8771
cab6fdd47703 (svn r12470) -Codechange: split order related types from order.h (and openttd.h) to order_type.h.
rubidium
parents:
diff changeset
   143
cab6fdd47703 (svn r12470) -Codechange: split order related types from order.h (and openttd.h) to order_type.h.
rubidium
parents:
diff changeset
   144
/* Possible clone options */
cab6fdd47703 (svn r12470) -Codechange: split order related types from order.h (and openttd.h) to order_type.h.
rubidium
parents:
diff changeset
   145
enum {
cab6fdd47703 (svn r12470) -Codechange: split order related types from order.h (and openttd.h) to order_type.h.
rubidium
parents:
diff changeset
   146
	CO_SHARE   = 0,
cab6fdd47703 (svn r12470) -Codechange: split order related types from order.h (and openttd.h) to order_type.h.
rubidium
parents:
diff changeset
   147
	CO_COPY    = 1,
cab6fdd47703 (svn r12470) -Codechange: split order related types from order.h (and openttd.h) to order_type.h.
rubidium
parents:
diff changeset
   148
	CO_UNSHARE = 2
cab6fdd47703 (svn r12470) -Codechange: split order related types from order.h (and openttd.h) to order_type.h.
rubidium
parents:
diff changeset
   149
};
cab6fdd47703 (svn r12470) -Codechange: split order related types from order.h (and openttd.h) to order_type.h.
rubidium
parents:
diff changeset
   150
cab6fdd47703 (svn r12470) -Codechange: split order related types from order.h (and openttd.h) to order_type.h.
rubidium
parents:
diff changeset
   151
struct Order;
cab6fdd47703 (svn r12470) -Codechange: split order related types from order.h (and openttd.h) to order_type.h.
rubidium
parents:
diff changeset
   152
cab6fdd47703 (svn r12470) -Codechange: split order related types from order.h (and openttd.h) to order_type.h.
rubidium
parents:
diff changeset
   153
#endif /* ORDER_TYPE_H */