src/build_vehicle_gui.cpp
changeset 8179 1fa8cc3fbeb8
parent 8091 f24d360b6ba1
child 8259 127e5d73637d
equal deleted inserted replaced
8178:85fdbc7ffa9f 8179:1fa8cc3fbeb8
   763 	 * when planes become obsolete and are removed */
   763 	 * when planes become obsolete and are removed */
   764 	sel_id = INVALID_ENGINE;
   764 	sel_id = INVALID_ENGINE;
   765 	for (eid = AIRCRAFT_ENGINES_INDEX; eid < AIRCRAFT_ENGINES_INDEX + NUM_AIRCRAFT_ENGINES; eid++) {
   765 	for (eid = AIRCRAFT_ENGINES_INDEX; eid < AIRCRAFT_ENGINES_INDEX + NUM_AIRCRAFT_ENGINES; eid++) {
   766 		if (!IsEngineBuildable(eid, VEH_AIRCRAFT, _local_player)) continue;
   766 		if (!IsEngineBuildable(eid, VEH_AIRCRAFT, _local_player)) continue;
   767 		/* First VEH_END window_numbers are fake to allow a window open for all different types at once */
   767 		/* First VEH_END window_numbers are fake to allow a window open for all different types at once */
   768 		if (w->window_number > VEH_END && !IsAircraftBuildableAtStation(eid, w->window_number)) continue;
   768 		if (w->window_number > VEH_END && !CanAircraftUseStation(eid, w->window_number)) continue;
   769 
   769 
   770 		EngList_Add(&bv->eng_list, eid);
   770 		EngList_Add(&bv->eng_list, eid);
   771 		if (eid == bv->sel_engine) sel_id = eid;
   771 		if (eid == bv->sel_engine) sel_id = eid;
   772 	}
   772 	}
   773 
   773