Cargo type orders: Add support for 64 cargo types

This commit is contained in:
Jonathan G Rennison
2018-07-02 19:20:59 +01:00
parent 0ae32838ea
commit 00b1fe6246
9 changed files with 39 additions and 38 deletions

View File

@@ -23,7 +23,7 @@
*/
class LinkRefresher {
public:
static void Run(Vehicle *v, bool allow_merge = true, bool is_full_loading = false, uint32 cargo_mask = ~0);
static void Run(Vehicle *v, bool allow_merge = true, bool is_full_loading = false, CargoTypes cargo_mask = ALL_CARGOTYPES);
protected:
/**
@@ -89,9 +89,9 @@ protected:
CargoID cargo; ///< Cargo given in last refit order.
bool allow_merge; ///< If the refresher is allowed to merge or extend link graphs.
bool is_full_loading; ///< If the vehicle is full loading.
uint32 cargo_mask; ///< Bit-mask of cargo IDs to refresh.
CargoTypes cargo_mask; ///< Bit-mask of cargo IDs to refresh.
LinkRefresher(Vehicle *v, HopSet *seen_hops, bool allow_merge, bool is_full_loading, uint32 cargo_mask);
LinkRefresher(Vehicle *v, HopSet *seen_hops, bool allow_merge, bool is_full_loading, CargoTypes cargo_mask);
bool HandleRefit(CargoID refit_cargo);
void ResetRefit();