src/train_gui.cpp
changeset 5868 94430141c189
parent 5824 8398b44ad3bc
child 5874 2db89a640b7a
equal deleted inserted replaced
5867:b7aa408ce6f3 5868:94430141c189
   156 
   156 
   157 		if (is_localplayer) {
   157 		if (is_localplayer) {
   158 			/* See if any vehicle can be refitted */
   158 			/* See if any vehicle can be refitted */
   159 			for (u = v; u != NULL; u = u->next) {
   159 			for (u = v; u != NULL; u = u->next) {
   160 				if (EngInfo(u->engine_type)->refit_mask != 0 ||
   160 				if (EngInfo(u->engine_type)->refit_mask != 0 ||
   161 						(!(RailVehInfo(v->engine_type)->flags & RVI_WAGON) && v->cargo_cap != 0)) {
   161 						(RailVehInfo(v->engine_type)->railveh_type != RAILVEH_WAGON && v->cargo_cap != 0)) {
   162 					EnableWindowWidget(w, 12);
   162 					EnableWindowWidget(w, 12);
   163 					/* We have a refittable carriage, bail out */
   163 					/* We have a refittable carriage, bail out */
   164 					break;
   164 					break;
   165 				}
   165 				}
   166 			}
   166 			}
   339 	}
   339 	}
   340 }
   340 }
   341 
   341 
   342 static void TrainDetailsInfoTab(const Vehicle *v, int x, int y)
   342 static void TrainDetailsInfoTab(const Vehicle *v, int x, int y)
   343 {
   343 {
   344 	if (RailVehInfo(v->engine_type)->flags & RVI_WAGON) {
   344 	if (RailVehInfo(v->engine_type)->railveh_type == RAILVEH_WAGON) {
   345 		SetDParam(0, GetCustomEngineName(v->engine_type));
   345 		SetDParam(0, GetCustomEngineName(v->engine_type));
   346 		SetDParam(1, v->value);
   346 		SetDParam(1, v->value);
   347 		DrawString(x, y, STR_882D_VALUE, 0x10);
   347 		DrawString(x, y, STR_882D_VALUE, 0x10);
   348 	} else {
   348 	} else {
   349 		SetDParam(0, GetCustomEngineName(v->engine_type));
   349 		SetDParam(0, GetCustomEngineName(v->engine_type));