src/autoreplace_cmd.cpp
branchnoai
changeset 9869 6404afe43575
parent 9837 c9ec4f82e0d0
child 10249 58810805030e
equal deleted inserted replaced
9868:3998f2e73dda 9869:6404afe43575
    69 	} else {
    69 	} else {
    70 		u = v;
    70 		u = v;
    71 	}
    71 	}
    72 
    72 
    73 	FOR_VEHICLE_ORDERS(u, o) {
    73 	FOR_VEHICLE_ORDERS(u, o) {
    74 		if (!(o->refit_cargo < NUM_CARGO)) continue;
    74 		if (!o->IsRefit()) continue;
    75 		if (!CanRefitTo(v->engine_type, o->refit_cargo)) continue;
    75 		if (!CanRefitTo(v->engine_type, o->GetRefitCargo())) continue;
    76 		if (!CanRefitTo(engine_type, o->refit_cargo)) return false;
    76 		if (!CanRefitTo(engine_type, o->GetRefitCargo())) return false;
    77 	}
    77 	}
    78 
    78 
    79 	return true;
    79 	return true;
    80 }
    80 }
    81 
    81