summaryrefslogtreecommitdiff
path: root/vehicle.c
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2006-10-08 22:16:30 +0000
committerbjarni <bjarni@openttd.org>2006-10-08 22:16:30 +0000
commitc6c3284fd4ecb9d44ac25942a0fc55c16c63d993 (patch)
tree988085143383ed3223713c0d761d2843fcae9c49 /vehicle.c
parent2e7dc02b91ed654483cace67bcc4324ab26ed001 (diff)
downloadopenttd-c6c3284fd4ecb9d44ac25942a0fc55c16c63d993.tar.xz
(svn r6698) -Code cleanup r6697: simplified getting the string of the vehicle type
Diffstat (limited to 'vehicle.c')
-rw-r--r--vehicle.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/vehicle.c b/vehicle.c
index 59f547622..e4b1ddbf7 100644
--- a/vehicle.c
+++ b/vehicle.c
@@ -2540,13 +2540,7 @@ void VehicleEnterDepot(Vehicle *v)
v->leave_depot_instantly = false; // We ensure that the vehicle stays in the depot
if (v->owner == _local_player) {
/* Notify the user that we stopped the vehicle */
- switch (v->type) {
- case VEH_Train: SetDParam(0, STR_019F_TRAIN); break;
- case VEH_Road: SetDParam(0, STR_019C_ROAD_VEHICLE); break;
- case VEH_Ship: SetDParam(0, STR_019E_SHIP); break;
- case VEH_Aircraft: SetDParam(0, STR_019D_AIRCRAFT); break;
- default: NOT_REACHED();
- }
+ SetDParam(0, _vehicle_type_names[v->type - 0x10]);
SetDParam(1, v->unitnumber);
AddNewsItem(STR_ORDER_REFIT_FAILED, NEWS_FLAGS(NM_SMALL, NF_VIEWPORT|NF_VEHICLE, NT_ADVICE, 0), v->index, 0);
}