mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-26 07:59:09 +00:00
(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.
This commit is contained in:
10
order_cmd.c
10
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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user