diff options
author | bjarni <bjarni@openttd.org> | 2006-09-01 10:24:15 +0000 |
---|---|---|
committer | bjarni <bjarni@openttd.org> | 2006-09-01 10:24:15 +0000 |
commit | d7e1d08d53d7d9885c747d7e1095d607f8f5cebe (patch) | |
tree | e86a7aeb29a672f565ab4b7aa38c5cb4a0010e93 /vehicle.h | |
parent | 7d3685a8ad0661c43dda4deb8c2559226b3370fe (diff) | |
download | openttd-d7e1d08d53d7d9885c747d7e1095d607f8f5cebe.tar.xz |
(svn r6291) -Feature: Vehicle lists from the station window now also got the goto depot button
-Codechange: unified the code for mass goto depot to avoid duplicated code
-Fix: Vehicles already on the way to depots will not be cancelled by mass goto depot (made it really hard to send all vehicles at once)
Diffstat (limited to 'vehicle.h')
-rw-r--r-- | vehicle.h | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -315,7 +315,16 @@ int CheckTrainStoppedInDepot(const Vehicle *v); bool VehicleNeedsService(const Vehicle *v); uint GenerateVehicleSortList(const Vehicle** sort_list, byte type, PlayerID owner, StationID station, OrderID order, uint16 window_type); -int32 SendAllVehiclesToDepot(byte type, uint32 flags, bool service, PlayerID owner); +int32 SendAllVehiclesToDepot(byte type, uint32 flags, bool service, PlayerID owner, uint16 vlw_flag, uint32 id); + +/* Flags to add to p2 for goto depot commands */ +/* Note: bits 8-10 are used for VLW flags */ +enum { + DEPOT_SERVICE = (1 << 0), // The vehicle will leave the depot right after arrival (serivce only) + DEPOT_MASS_SEND = (1 << 1), // Tells that it's a mass send to depot command (type in VLW flag) + DEPOT_DONT_CANCEL = (1 << 2), // Don't cancel current goto depot command if any + DEPOT_LOCATE_HANGAR = (1 << 3), // Find another airport if the target one lacks a hangar +}; typedef struct GetNewVehiclePosResult { int x,y; |