1
0
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:
tron
2004-12-10 18:16:08 +00:00
parent 55bac62c5a
commit 5b0915e677
18 changed files with 676 additions and 748 deletions

View File

@@ -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;
}