summaryrefslogtreecommitdiff
path: root/train.h
diff options
context:
space:
mode:
Diffstat (limited to 'train.h')
-rw-r--r--train.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/train.h b/train.h
index 792c5e937..bb0b309eb 100644
--- a/train.h
+++ b/train.h
@@ -218,4 +218,12 @@ static inline Vehicle *GetNextVehicle(const Vehicle *v)
void ConvertOldMultiheadToNew(void);
void ConnectMultiheadedTrains(void);
+static inline bool IsWholeTrainInDepot(const Vehicle *v)
+{
+ for (; v != NULL; v = v->next) {
+ if (!(v->vehstatus & VS_HIDDEN)) return false;
+ }
+ return true;
+}
+
#endif /* TRAIN_H */