summaryrefslogtreecommitdiff
path: root/src/linkgraph/refresh.h
diff options
context:
space:
mode:
authorfonsinchen <fonsinchen@openttd.org>2014-09-21 14:22:32 +0000
committerfonsinchen <fonsinchen@openttd.org>2014-09-21 14:22:32 +0000
commit831fb254f604309a255ea310bc6647cfa9c3fdc9 (patch)
tree2893b8190eee553c4f424af8e6852d099dbe174b /src/linkgraph/refresh.h
parent14a599409e2e73b7a31b12f80741baa07fc7502c (diff)
downloadopenttd-831fb254f604309a255ea310bc6647cfa9c3fdc9.tar.xz
(svn r26889) -Feature: Predict links for station-autorefitting vehicles
Diffstat (limited to 'src/linkgraph/refresh.h')
-rw-r--r--src/linkgraph/refresh.h11
1 files changed, 6 insertions, 5 deletions
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);