summaryrefslogtreecommitdiff
path: root/src/order_base.h
diff options
context:
space:
mode:
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.