summaryrefslogtreecommitdiff
path: root/src/order_base.h
diff options
context:
space:
mode:
authormichi_cc <michi_cc@openttd.org>2011-12-13 00:43:48 +0000
committermichi_cc <michi_cc@openttd.org>2011-12-13 00:43:48 +0000
commit34ffd08a19e1156260223256d87a4cdfa7a080e0 (patch)
treeaa2314af8b03b75a242e3f488acf53a9b07d0a47 /src/order_base.h
parentdef8e7215bdabee99ad49adedb8730ae33b6c47f (diff)
downloadopenttd-34ffd08a19e1156260223256d87a4cdfa7a080e0.tar.xz
(svn r23505) -Add: Indication in the order list if the next destination of an order is out of range.
Diffstat (limited to 'src/order_base.h')
-rw-r--r--src/order_base.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/order_base.h b/src/order_base.h
index c724df241..d0e4b4da6 100644
--- a/src/order_base.h
+++ b/src/order_base.h
@@ -80,6 +80,15 @@ public:
void MakeImplicit(StationID destination);
/**
+ * Is this a 'goto' order with a real destination?
+ * @return True if the type sis either #OT_GOTO_WAYPOINT, #OT_GOTO_DEPOT or #OT_GOTO_STATION.
+ */
+ inline bool IsGotoOrder() const
+ {
+ return IsType(OT_GOTO_WAYPOINT) || IsType(OT_GOTO_DEPOT) || IsType(OT_GOTO_STATION);
+ }
+
+ /**
* Gets the destination of this order.
* @pre IsType(OT_GOTO_WAYPOINT) || IsType(OT_GOTO_DEPOT) || IsType(OT_GOTO_STATION).
* @return the destination of the order.