VehicleStateDriving = VehicleStateDriving or class(BaseVehicleState)

function VehicleStateDriving:init(unit)
	BaseVehicleState.init(self, unit)
end

function VehicleStateDriving:enter(state_data, enter_data)
	self._unit:vehicle_driving():_start_engine_sound()
	self._unit:interaction():set_override_timer_value(VehicleDrivingExt.TIME_ENTER)
	self:adjust_interactions()
	self._unit:interaction():set_contour("standard_color", 0)
end

function VehicleStateDriving:adjust_interactions()
	VehicleStateDriving.super.adjust_interactions(self)
	if self._unit:vehicle_driving():is_interaction_allowed() then
		if self._unit:damage() and self._unit:damage():has_sequence(VehicleDrivingExt.INTERACT_ENTRY_ENABLED) then
			self._unit:damage():run_sequence_simple(VehicleDrivingExt.INTERACT_INTERACTION_ENABLED)
			self._unit:damage():run_sequence_simple(VehicleDrivingExt.INTERACT_ENTRY_ENABLED)
			self._unit:damage():run_sequence_simple(VehicleDrivingExt.INTERACT_LOOT_ENABLED)
			self._unit:damage():run_sequence_simple(VehicleDrivingExt.INTERACT_REPAIR_DISABLED)
		end
		self._unit:vehicle_driving()._interaction_enter_vehicle = true
		if self._unit:vehicle_driving()._has_trunk then
			self._unit:vehicle_driving()._interaction_trunk = true
		else
			self._unit:vehicle_driving()._interaction_loot = true
		end
		self._unit:vehicle_driving()._interaction_repair = false
	end
end

function VehicleStateDriving:is_vulnerable()
	return true
end
