diff options
author | rubidium <rubidium@openttd.org> | 2010-12-26 13:25:34 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2010-12-26 13:25:34 +0000 |
commit | 28f16a732fbcc759c9cceef7c9a160486b37f896 (patch) | |
tree | 59bdebd2d20b864446cb218e1bdac6742cfbf332 /src/order_base.h | |
parent | b06b05c360830efe5a689a9340b1d327f5d45189 (diff) | |
download | openttd-28f16a732fbcc759c9cceef7c9a160486b37f896.tar.xz |
(svn r21644) -Change: keep showing "No orders" when the order list is filled with only automatic orders
Diffstat (limited to 'src/order_base.h')
-rw-r--r-- | src/order_base.h | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/order_base.h b/src/order_base.h index 6503c2999..b04ca2b05 100644 --- a/src/order_base.h +++ b/src/order_base.h @@ -272,17 +272,18 @@ private: friend void AfterLoadVehicles(bool part_of_load); ///< For instantiating the shared vehicle chain friend const struct SaveLoad *GetOrderListDescription(); ///< Saving and loading of order lists. - Order *first; ///< First order of the order list - VehicleOrderID num_orders; ///< NOSAVE: How many orders there are in the list - uint num_vehicles; ///< NOSAVE: Number of vehicles that share this order list - Vehicle *first_shared; ///< NOSAVE: pointer to the first vehicle in the shared order chain + Order *first; ///< First order of the order list. + VehicleOrderID num_orders; ///< NOSAVE: How many orders there are in the list. + VehicleOrderID num_manual_orders; ///< NOSAVE: How many manually added orders are there in the list. + uint num_vehicles; ///< NOSAVE: Number of vehicles that share this order list. + Vehicle *first_shared; ///< NOSAVE: pointer to the first vehicle in the shared order chain. - Ticks timetable_duration; ///< NOSAVE: Total duration of the order list + Ticks timetable_duration; ///< NOSAVE: Total duration of the order list public: /** Default constructor producing an invalid order list. */ OrderList(VehicleOrderID num_orders = INVALID_VEH_ORDER_ID) - : first(NULL), num_orders(num_orders), num_vehicles(0), first_shared(NULL), + : first(NULL), num_orders(num_orders), num_manual_orders(0), num_vehicles(0), first_shared(NULL), timetable_duration(0) { } /** @@ -328,6 +329,12 @@ public: inline VehicleOrderID GetNumOrders() const { return this->num_orders; } /** + * Get number of manually added orders in the order list. + * @return number of manual orders in the chain. + */ + inline VehicleOrderID GetNumManualOrders() const { return this->num_manual_orders; } + + /** * Insert a new order into the order chain. * @param new_order is the order to insert into the chain. * @param index is the position where the order is supposed to be inserted. |