src/ai/trolly/build.cpp
changeset 8884 f6c5142d1434
parent 8750 fdd6054e7bae
child 8885 b18a67c2eaeb
equal deleted inserted replaced
8883:830c088b375e 8884:f6c5142d1434
   246 			CommandCost ret;
   246 			CommandCost ret;
   247 
   247 
   248 			/* Skip vehicles which can't take our cargo type */
   248 			/* Skip vehicles which can't take our cargo type */
   249 			if (rvi->cargo_type != _players_ainew[p->index].cargo && !CanRefitTo(i, _players_ainew[p->index].cargo)) continue;
   249 			if (rvi->cargo_type != _players_ainew[p->index].cargo && !CanRefitTo(i, _players_ainew[p->index].cargo)) continue;
   250 
   250 
       
   251 			/* Skip trams */
       
   252 			if (HasBit(EngInfo(i)->misc_flags, EF_ROAD_TRAM)) continue;
       
   253 
   251 			// Is it availiable?
   254 			// Is it availiable?
   252 			// Also, check if the reliability of the vehicle is above the AI_VEHICLE_MIN_RELIABILTY
   255 			// Also, check if the reliability of the vehicle is above the AI_VEHICLE_MIN_RELIABILTY
   253 			if (!HasBit(e->player_avail, _current_player) || e->reliability * 100 < AI_VEHICLE_MIN_RELIABILTY << 16) continue;
   256 			if (!HasBit(e->player_avail, _current_player) || e->reliability * 100 < AI_VEHICLE_MIN_RELIABILTY << 16) continue;
   254 
   257 
   255 			/* Rate and compare the engine by speed & capacity */
   258 			/* Rate and compare the engine by speed & capacity */