diff options
author | tron <tron@openttd.org> | 2004-12-10 18:16:08 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2004-12-10 18:16:08 +0000 |
commit | 5b0915e67774c9e8ac84d192cf6bd409286166ec (patch) | |
tree | 66a06b77592865f6aa9640d6c1ddd3648d89f2d3 /roadveh_cmd.c | |
parent | 55bac62c5ac9a404f970fdfc1eccde155dea641c (diff) | |
download | openttd-5b0915e67774c9e8ac84d192cf6bd409286166ec.tar.xz |
(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.
Diffstat (limited to 'roadveh_cmd.c')
-rw-r--r-- | roadveh_cmd.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/roadveh_cmd.c b/roadveh_cmd.c index f9acd3c44..7df7b7f44 100644 --- a/roadveh_cmd.c +++ b/roadveh_cmd.c @@ -184,8 +184,7 @@ int32 CmdBuildRoadVeh(int x, int y, uint32 flags, uint32 p1, uint32 p2) VehiclePositionChanged(v); InvalidateWindow(WC_VEHICLE_DEPOT, v->tile); - _vehicle_sort_dirty[VEHROAD] = true; // build a new bus/truck - InvalidateWindow(WC_ROADVEH_LIST, v->owner); + RebuildVehicleLists(); InvalidateWindow(WC_COMPANY, v->owner); } @@ -228,8 +227,7 @@ int32 CmdSellRoadVeh(int x, int y, uint32 flags, uint32 p1, uint32 p2) if (flags & DC_EXEC) { // Invalidate depot InvalidateWindow(WC_VEHICLE_DEPOT, v->tile); - _vehicle_sort_dirty[VEHROAD] = true; // sell a bus/truck - InvalidateWindow(WC_ROADVEH_LIST, v->owner); + RebuildVehicleLists(); InvalidateWindow(WC_COMPANY, v->owner); DeleteWindowById(WC_VEHICLE_VIEW, v->index); DeleteVehicle(v); @@ -422,8 +420,7 @@ static void RoadVehDelete(Vehicle *v) DeleteWindowById(WC_VEHICLE_VIEW, v->index); InvalidateWindow(WC_VEHICLE_DETAILS, v->index); - _vehicle_sort_dirty[VEHROAD] = true; // delete bus/truck (eg. crash for example) - InvalidateWindow(WC_ROADVEH_LIST, v->owner); + RebuildVehicleLists(); InvalidateWindow(WC_COMPANY, v->owner); if(IS_TILETYPE(v->tile, MP_STATION)) |