From 831fb254f604309a255ea310bc6647cfa9c3fdc9 Mon Sep 17 00:00:00 2001 From: fonsinchen Date: Sun, 21 Sep 2014 14:22:32 +0000 Subject: (svn r26889) -Feature: Predict links for station-autorefitting vehicles --- src/linkgraph/refresh.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/linkgraph/refresh.h') diff --git a/src/linkgraph/refresh.h b/src/linkgraph/refresh.h index eac34266d..7c221bc22 100644 --- a/src/linkgraph/refresh.h +++ b/src/linkgraph/refresh.h @@ -31,10 +31,11 @@ protected: * an influence on the next one. */ enum RefreshFlags { - USE_NEXT, ///< There was a conditional jump. Try to use the given next order when looking for a new one. - HAS_CARGO, ///< Consist could leave the last stop where it could interact with cargo carrying cargo (i.e. not an "unload all" + "no loading" order). - WAS_REFIT, ///< Consist was refit since the last stop where it could interact with cargo. - RESET_REFIT ///< Consist had a chance to load since the last refit and the refit capacities can be reset. + USE_NEXT, ///< There was a conditional jump. Try to use the given next order when looking for a new one. + HAS_CARGO, ///< Consist could leave the last stop where it could interact with cargo carrying cargo (i.e. not an "unload all" + "no loading" order). + WAS_REFIT, ///< Consist was refit since the last stop where it could interact with cargo. + RESET_REFIT, ///< Consist had a chance to load since the last refit and the refit capacities can be reset. + IN_AUTOREFIT, ///< Currently doing an autorefit loop. Ignore the first autorefit order. }; /** @@ -92,7 +93,7 @@ protected: LinkRefresher(Vehicle *v, HopSet *seen_hops, bool allow_merge, bool is_full_loading); - void HandleRefit(const Order *next); + bool HandleRefit(CargoID refit_cargo); void ResetRefit(); void RefreshStats(const Order *cur, const Order *next); const Order *PredictNextOrder(const Order *cur, const Order *next, uint8 flags, uint num_hops = 0); -- cgit v1.2.3-54-g00ecf