diff options
author | bjarni <bjarni@openttd.org> | 2006-10-05 08:15:51 +0000 |
---|---|---|
committer | bjarni <bjarni@openttd.org> | 2006-10-05 08:15:51 +0000 |
commit | ff6f83b56ca48d1590ae7adc8f6f85fbfe7c7424 (patch) | |
tree | 09af992dd594d5b616ba90411c39a8baa3fb6380 /vehicle.c | |
parent | 7606b2707d5bee3f274e1e0dd58b00decd5110a0 (diff) | |
download | openttd-ff6f83b56ca48d1590ae7adc8f6f85fbfe7c7424.tar.xz |
(svn r6646) -Codechange: [vehicle list window] Cleaned up the drawing code
This moved a few of the strings and sprites a few pixels. Hopefully this will work out ok.
Diffstat (limited to 'vehicle.c')
-rw-r--r-- | vehicle.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -2439,6 +2439,18 @@ int32 SendAllVehiclesToDepot(byte type, uint32 flags, bool service, PlayerID own return (flags & DC_EXEC) ? 0 : CMD_ERROR; } +bool IsVehicleInDepot(const Vehicle *v) +{ + switch (v->type) { + case VEH_Train: return CheckTrainInDepot(v, false) != -1; + case VEH_Road: return IsRoadVehInDepot(v); + case VEH_Ship: return IsShipInDepot(v); + case VEH_Aircraft: return IsAircraftInHangar(v); + default: NOT_REACHED(); + } + return false; +} + void VehicleEnterDepot(Vehicle *v) { switch (v->type) { |