From 5b0915e67774c9e8ac84d192cf6bd409286166ec Mon Sep 17 00:00:00 2001 From: tron Date: Fri, 10 Dec 2004 18:16:08 +0000 Subject: (svn r1009) -Feature: per-station vehicle lists This adds a little button per vehicle class to the station window which opens a list of all vehicles that have this station on their schedule. As side effect this gets rid of some global variables. --- order_cmd.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'order_cmd.c') diff --git a/order_cmd.c b/order_cmd.c index e08448b18..9de4a8c18 100644 --- a/order_cmd.c +++ b/order_cmd.c @@ -62,6 +62,8 @@ int32 CmdInsertOrder(int x, int y, uint32 flags, uint32 p1, uint32 p2) } } } + + RebuildVehicleLists(); } return 0; @@ -81,6 +83,8 @@ static int32 DecloneOrder(Vehicle *dst, uint32 flags) dst->schedule_ptr = _ptr_to_next_order++; InvalidateWindow(WC_VEHICLE_ORDERS, dst->index); + + RebuildVehicleLists(); } return 0; } @@ -126,6 +130,8 @@ int32 CmdDeleteOrder(int x, int y, uint32 flags, uint32 p1, uint32 p2) } } } + + RebuildVehicleLists(); } return 0; @@ -240,6 +246,8 @@ int32 CmdCloneOrder(int x, int y, uint32 flags, uint32 p1, uint32 p2) InvalidateWindow(WC_VEHICLE_ORDERS, src->index); InvalidateWindow(WC_VEHICLE_ORDERS, dst->index); + + RebuildVehicleLists(); } break; } @@ -281,6 +289,8 @@ int32 CmdCloneOrder(int x, int y, uint32 flags, uint32 p1, uint32 p2) memcpy(dst->schedule_ptr, src->schedule_ptr, (src->num_orders + 1) * sizeof(uint16)); InvalidateWindow(WC_VEHICLE_ORDERS, dst->index); + + RebuildVehicleLists(); } break; } -- cgit v1.2.3-70-g09d2