(svn r14104) -Feature: Add a window for waypoints, allowing to view all the trains having the selected waypoint in their orders.
Changing its name is also supported from the same new window. Gui based on work done by Satyap, on FS#2025.
This commit is contained in:
@@ -67,6 +67,7 @@ void BuildDepotVehicleList(VehicleType type, TileIndex tile, VehicleList *engine
|
||||
* <li>VLW_STANDARD: not used<li>
|
||||
* <li>VLW_DEPOT_LIST: TileIndex of the depot/hangar to make the list for</li>
|
||||
* <li>VLW_GROUP_LIST: index of group to generate a list for</li>
|
||||
* <li>VLM_WAYPOINT_LIST: index of waypoint to generate a list for</li>
|
||||
* </ul>
|
||||
* @param window_type The type of window the list is for, using the VLW_ flags in vehicle_gui.h
|
||||
*/
|
||||
@@ -122,6 +123,21 @@ void GenerateVehicleSortList(VehicleList *list, VehicleType type, PlayerID owner
|
||||
}
|
||||
break;
|
||||
|
||||
case VLM_WAYPOINT_LIST:
|
||||
FOR_ALL_VEHICLES(v) {
|
||||
if (v->type == type && v->IsPrimaryVehicle()) {
|
||||
const Order *order;
|
||||
|
||||
FOR_VEHICLE_ORDERS(v, order) {
|
||||
if (order->IsType(OT_GOTO_WAYPOINT) && order->GetDestination() == index) {
|
||||
*list->Append() = v;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case VLW_GROUP_LIST:
|
||||
FOR_ALL_VEHICLES(v) {
|
||||
if (v->type == type && v->IsPrimaryVehicle() &&
|
||||
|
Reference in New Issue
Block a user