Lines Matching refs:veh

183     vehicle &veh = *veh_ptr;  in test_efficiency()  local
186 for( const vpart_reference &vp : veh.get_all_parts() ) { in test_efficiency()
190 for( const vpart_reference &vp : veh.get_avail_parts( "OPENABLE" ) ) { in test_efficiency()
191 veh.close( vp.part_index() ); in test_efficiency()
194 veh.refresh_insides(); in test_efficiency()
197 CHECK( to_gram( veh.total_mass() ) == expected_mass ); in test_efficiency()
199 expected_mass = to_gram( veh.total_mass() ); in test_efficiency()
200 veh.check_falling_or_floating(); in test_efficiency()
201 REQUIRE( !veh.is_in_water() ); in test_efficiency()
202 const auto &starting_fuel = set_vehicle_fuel( veh, fuel_level ); in test_efficiency()
205 const float starting_fuel_per = fuel_percentage_left( veh, starting_fuel ); in test_efficiency()
208 const tripoint starting_point = veh.global_pos3(); in test_efficiency()
209 veh.tags.insert( "IN_CONTROL_OVERRIDE" ); in test_efficiency()
210 veh.engine_on = true; in test_efficiency()
213 const int target_velocity = sign * std::min( 50 * 100, veh.safe_ground_velocity( false ) ); in test_efficiency()
214 veh.cruise_velocity = target_velocity; in test_efficiency()
218 veh.velocity = target_velocity; in test_efficiency()
224 CHECK( veh.safe_velocity() > 0 ); in test_efficiency()
225 while( veh.engine_on && veh.safe_velocity() > 0 && cycles_left > 0 ) { in test_efficiency()
228 veh.idle( true ); in test_efficiency()
230 REQUIRE( !veh.skidding ); in test_efficiency()
231 for( const tripoint &pos : veh.get_points() ) { in test_efficiency()
235 tiles_travelled += square_dist( starting_point, veh.global_pos3() ); in test_efficiency()
237 const tripoint displacement = starting_point - veh.global_pos3(); in test_efficiency()
238 here.displace_vehicle( veh, displacement ); in test_efficiency()
247 veh.cruise_velocity = accelerating ? target_velocity : 0; in test_efficiency()
249 veh.velocity = 0; in test_efficiency()
250 veh.last_turn = 0_degrees; in test_efficiency()
251 veh.of_turn_carry = 0; in test_efficiency()
257 float fuel_left = fuel_percentage_left( veh, starting_fuel ); in test_efficiency()
409 for( const std::string &veh : vehs_to_test ) { variable
410 find_efficiency( veh );
419 for( const std::string &veh : vehs_to_test ) { variable
420 const int in_forward = print_test_strings( veh );
421 forward_distance[ veh ] = in_forward;
424 for( const std::string &veh : vehs_to_test ) { variable
425 const int in_reverse = print_test_strings( veh, true );
426 CHECK( in_reverse < ( acceptable * forward_distance[ veh ] ) );