diff options
author | peter1138 <peter1138@openttd.org> | 2005-11-06 13:42:26 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2005-11-06 13:42:26 +0000 |
commit | bc25cd89bffd79785957b3f91f78c6646e9a51a6 (patch) | |
tree | 84353e1ac91e579a3ea163316e9e1fe281200d11 /vehicle_gui.c | |
parent | 220b4c27c1f8f58740ae4195e71f5e582a8474d0 (diff) | |
download | openttd-bc25cd89bffd79785957b3f91f78c6646e9a51a6.tar.xz |
(svn r3148) -NewGRF, Feature: Add support for cargo refitting specification by cargo classes.
Diffstat (limited to 'vehicle_gui.c')
-rw-r--r-- | vehicle_gui.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/vehicle_gui.c b/vehicle_gui.c index 818fb84aa..9edb40caa 100644 --- a/vehicle_gui.c +++ b/vehicle_gui.c @@ -226,18 +226,10 @@ CargoID DrawVehicleRefitWindow(const Vehicle *v, int sel) cmask = 0; u = v; do { - if (_engine_refit_masks[u->engine_type] != 0) { // newgrf custom refit mask - cmask |= _engine_refit_masks[u->engine_type]; - } else if (u->cargo_cap != 0) { - // rail wagons cant be refitted by default - if (v->type != VEH_Train || !(RailVehInfo(u->engine_type)->flags & RVI_WAGON)) - cmask |= _default_refitmasks[v->type - VEH_Train]; - } + cmask |= _engine_info[u->engine_type].refit_mask; u = u->next; } while (v->type == VEH_Train && u != NULL); - cmask &= _landscape_global_cargo_mask[_opt_ptr->landscape]; - /* Check which cargo has been selected from the refit window and draw list */ for (cid = 0; cmask != 0; cmask >>= 1, cid++) { if (HASBIT(cmask, 0)) // vehicle is refittable to this cargo |