module Base
{
    model Vehicles_TrailhandBody
    {
        mesh = vehicles/Vehicles_TrailhandBody,
        shader = vehicle_norandom_multiuv,
        invertX = false,
        scale = 0.008,
    }

    model Vehicles_TrailhandWheel
    {
        mesh = TrailhandWheel,
        texture = Vehicles/vehicle_trailhand_wheel,
        shader = vehiclewheel,
    }

    vehicle TrailhandSport
    {
        mechanicType = 2,
        engineRepairLevel = 5,
        playerDamageProtection = 1.3,
        offRoadEfficiency = 1.15,
        sound
        {
            alarmLoop = VehicleAlarmA VehicleAlarmB VehicleAlarmC VehicleAlarmD VehicleAlarmE,
            engine = VehicleEngineSUV,
            engineStart = VehicleEngineSUV,
            engineTurnOff = VehicleEngineSUV,
            horn = VehicleHornStandard,
            ignitionFail = VehicleIgnitionFailSUV,
        }
        extents = 0.9451 0.6374 2.0989,
        mass = 1000,
        physicsChassisShape = 0.9451 0.6374 2.0989,
        centerOfMassOffset = 0.0 0.3187 0.0,
        engineForce = 4700,
        maxSpeed = 90.0,
        engineLoudness = 100,
        engineQuality = 75,
        brakingForce = 95,
        stoppingMovementForce = 4.0,
        rollInfluence = 1.0,
        steeringIncrement = 0.04,
        steeringClamp = 0.3,
        suspensionStiffness = 40.0,
        suspensionCompression = 3.83,
        suspensionDamping = 2.88,
        maxSuspensionTravelCm = 10.0,
        suspensionRestLength = 0.2,
        wheelFriction = 1.4,
        frontEndHealth = 150,
        rearEndHealth = 150,
        seats = 4,
        wheel FrontLeft
        {
            front = true,
            offset = 0.3791 -0.3626 0.6978,
            radius = 0.15,
            width = 0.2,
        }
        wheel FrontRight
        {
            front = true,
            offset = -0.3791 -0.3626 0.6978,
            radius = 0.15,
            width = 0.2,
        }
        wheel RearLeft
        {
            front = false,
            offset = 0.3791 -0.3626 -0.5824,
            radius = 0.15,
            width = 0.2,
        }
        wheel RearRight
        {
            front = false,
            offset = -0.3791 -0.3626 -0.5824,
            radius = 0.15,
            width = 0.2,
        }
        area Engine
        {
            xywh = 0.0 1.2857 0.9451 0.4725,
        }
        area TruckBed
        {
            xywh = 0.0 -1.2857 0.9451 0.4725,
        }
        area GasTank
        {
            xywh = 0.7088 -0.5604 0.4725 0.4725,
        }
        area TireFrontLeft
        {
            xywh = 0.7088 0.6978 0.4725 0.4725,
        }
        area TireFrontRight
        {
            xywh = -0.7088 0.6978 0.4725 0.4725,
        }
        area TireRearLeft
        {
            xywh = 0.7088 -0.5604 0.4725 0.4725,
        }
        area TireRearRight
        {
            xywh = -0.7088 -0.5604 0.4725 0.4725,
        }
        template = TrunkDoor,
        template = Trunk/part/TruckBed,
        template = Seat/part/SeatFrontLeft,
        template = Seat/part/SeatFrontRight,
        template = Seat/part/SeatRearLeft,
        template = Seat/part/SeatRearRight,
        template = GloveBox,
        template = GasTank,
        template = Battery,
        template = Engine,
        template = Muffler,
        template = EngineDoor,
        template = Heater,
        template = Windshield/part/Windshield,
        template = Windshield/part/WindshieldRear,
        template = Window/part/WindowFrontLeft,
        template = Window/part/WindowFrontRight,
        template = Window/part/WindowRearLeft,
        template = Window/part/WindowRearRight,
        template = Door/part/DoorFrontLeft,
        template = Door/part/DoorFrontRight,
        template = Door/part/DoorRearLeft,
        template = Door/part/DoorRearRight,
        template = Tire,
        template = Brake,
        template = Suspension,
        template = Radio,
        template = Headlight,
        template = SUVCollision,
        part TrunkDoor
        {
            table install
            {
                recipes = Intermediate Mechanics,
            }
            table uninstall
            {
                recipes = Intermediate Mechanics,
            }
        }
        part TruckBed
        {
            container
            {
                test = Vehicles.ContainerAccess.TruckBedOpenInside,
            }
        }
        part Seat*
        {
            table install
            {
                skills = Mechanics:2,
                recipes = Intermediate Mechanics,
            }
            table uninstall
            {
                skills = Mechanics:2,
                recipes = Intermediate Mechanics,
            }
        }
        part GasTank
        {
            table install
            {
                skills = Mechanics:7,
                recipes = Intermediate Mechanics,
            }
            table uninstall
            {
                skills = Mechanics:7,
                recipes = Intermediate Mechanics,
            }
        }
        part Muffler
        {
            table install
            {
                recipes = Intermediate Mechanics,
            }
            table uninstall
            {
                recipes = Intermediate Mechanics,
            }
        }
        part EngineDoor
        {
            table install
            {
                recipes = Intermediate Mechanics,
            }
            table uninstall
            {
                recipes = Intermediate Mechanics,
            }
        }
        part Heater
        {
            category = engine,
            lua
            {
                update = Vehicles.Update.Heater,
            }
        }
        part PassengerCompartment
        {
            category = nodisplay,
            lua
            {
                update = Vehicles.Update.PassengerCompartment,
            }
        }
        part Windshield*
        {
            table install
            {
                recipes = Intermediate Mechanics,
            }
            table uninstall
            {
                recipes = Intermediate Mechanics,
            }
        }
        part Window*
        {
            table install
            {
                recipes = Intermediate Mechanics,
            }
            table uninstall
            {
                recipes = Intermediate Mechanics,
            }
        }
        part Door*
        {
            table install
            {
                recipes = Intermediate Mechanics,
            }
            table uninstall
            {
                recipes = Intermediate Mechanics,
            }
        }
        part Brake*
        {
            table install
            {
                skills = Mechanics:6,
                recipes = Intermediate Mechanics,
            }
            table uninstall
            {
                skills = Mechanics:6,
                recipes = Intermediate Mechanics,
            }
        }
        part Suspension*
        {
            table install
            {
                skills = Mechanics:6,
                recipes = Intermediate Mechanics,
            }
            table uninstall
            {
                skills = Mechanics:6,
                recipes = Intermediate Mechanics,
            }
        }
        attachment trailer
        {
            offset = 0.0 -0.2747 -1.0714,
            rotate = 0.0 0.0 0.0,
            zoffset = -1.0,
        }
        attachment trailerfront
        {
            offset = 0.0 -0.2747 1.0769,
            rotate = 0.0 0.0 0.0,
            zoffset = 1.0,
        }
    
        specialKeyRing = Base.KeyRing_EagleFlag;Base.KeyRing_EightBall;Base.KeyRing_PineTree,
        specialLootChance = 40,
        model
        {
            file = Base.Vehicles_TrailhandBody,
            scale = 1.48,
            offset = 0.0 0.3022 0.0,
        }
        skin
        {
            texture = Vehicles/vehicle_trailhand_body,
        }
        textureMask = Vehicles/vehicle_trailhand_mask,
        textureLights = Vehicles/vehicle_trailhand_lights,
        textureRust = Vehicles/vehicle_trailhand_rust,
        textureDamage1Overlay = Vehicles/vehicle_trailhand_blood_mask,
        textureDamage2Overlay = Vehicles/vehicle_trailhand_blood_hvy,
        textureDamage1Shell = Vehicles/vehicle_trailhand_damage1,
        textureDamage2Shell = Vehicles/vehicle_trailhand_damage2,
        sound
        {
            alarmLoop = VehicleAlarmA VehicleAlarmB VehicleAlarmC VehicleAlarmD VehicleAlarmE,
            engine = VehicleEnginePickUpTruck,
            engineStart = VehicleEnginePickUpTruck,
            engineTurnOff = VehicleEnginePickUpTruck,
            horn = VehicleHornStandard,
            ignitionFail = VehicleIgnitionFailPickUpTruck,
        }
        mass = 1150,
        engineForce = 8050,
        maxSpeed = 120.0,
        offRoadEfficiency = 1.2,
        engineQuality = 88,
        engineLoudness = 95,
        rollInfluence = 0.4,
        wheelFriction = 1.5,
        brakingForce = 142,
        suspensionStiffness = 45.0,
        suspensionDamping = 3.4,
        wheel FrontLeft
        {
            front = true,
            offset = 0.3901 -0.3022 0.8736,
            radius = 0.2308,
            width = 0.1600,
        }
        wheel FrontRight
        {
            front = true,
            offset = -0.3901 -0.3022 0.8736,
            radius = 0.2308,
            width = 0.1600,
        }
        wheel RearLeft
        {
            front = false,
            offset = 0.3901 -0.3022 -0.9286,
            radius = 0.2308,
            width = 0.1600,
        }
        wheel RearRight
        {
            front = false,
            offset = -0.3901 -0.3022 -0.9286,
            radius = 0.2308,
            width = 0.1600,
        }
        template = PassengerSeat4,
        useChassisPhysicsCollision = true,
        part TireFrontLeft
        {
            model InflatedTirePlusWheel
            {
                file = Base.Vehicles_TrailhandWheel,
            }
        }
        part TireFrontRight
        {
            model InflatedTirePlusWheel
            {
                file = Base.Vehicles_TrailhandWheel,
            }
        }
        part TireRearLeft
        {
            model InflatedTirePlusWheel
            {
                file = Base.Vehicles_TrailhandWheel,
            }
        }
        part TireRearRight
        {
            model InflatedTirePlusWheel
            {
                file = Base.Vehicles_TrailhandWheel,
            }
        }
        part TruckBed
        {
            container
            {
                capacity = 130,
            }
        }
        passenger FrontLeft
        {
            position inside
            {
                offset = 0.2200 -0.0500 0.1000,
                rotate = 0.0 0.0 0.0,
            }
            position outside
            {
                offset = 0.6600 -0.467 0.2500,
                rotate = 0.0 0.0 0.0,
                area = SeatFrontLeft,
            }
        }
        passenger FrontRight
        {
            position inside
            {
                offset = -0.2200 -0.0500 0.1000,
                rotate = 0.0 0.0 0.0,
            }
            position outside
            {
                offset = -0.6600 -0.467 0.2500,
                rotate = 0.0 0.0 0.0,
                area = SeatFrontRight,
            }
        }
        passenger RearLeft
        {
            position inside
            {
                offset = 0.2200 -0.0500 -0.3600,
                rotate = 0.0 0.0 0.0,
            }
            position outside
            {
                offset = 0.6600 -0.467 -0.2000,
                rotate = 0.0 0.0 0.0,
                area = SeatRearLeft,
            }
        }
        passenger RearRight
        {
            position inside
            {
                offset = -0.2200 -0.0500 -0.3600,
                rotate = 0.0 0.0 0.0,
            }
            position outside
            {
                offset = -0.6600 -0.467 -0.2000,
                rotate = 0.0 0.0 0.0,
                area = SeatRearRight,
            }
        }
        area Engine
        {
            xywh = 0.0 1.6700 0.8200 0.5800,
        }
        area TruckBed
        {
            xywh = 0.0 -1.7400 0.8200 0.5800,
        }
        area SeatFrontLeft
        {
            xywh = 0.7200 0.2500 0.5800 0.5800,
        }
        area SeatFrontRight
        {
            xywh = -0.7200 0.2500 0.5800 0.5800,
        }
        area SeatRearLeft
        {
            xywh = 0.7200 -0.2200 0.5800 0.5800,
        }
        area SeatRearRight
        {
            xywh = -0.7200 -0.2200 0.5800 0.5800,
        }
        area GasTank
        {
            xywh = 0.7200 -0.6240 0.5800 0.5800,
        }
        area TireFrontLeft
        {
            xywh = 0.6100 0.8736 0.5800 0.5800,
        }
        area TireFrontRight
        {
            xywh = -0.6100 0.8736 0.5800 0.5800,
        }
        area TireRearLeft
        {
            xywh = 0.6100 -0.9286 0.5800 0.5800,
        }
        area TireRearRight
        {
            xywh = -0.6100 -0.9286 0.5800 0.5800,
        }
        extents = 1.0200 0.6600 2.9400,
        physicsChassisShape = 1.0200 0.6600 2.9400,
        centerOfMassOffset = 0.0 0.3022 0.0,
        shadowExtents = 1.0200 2.9400,
        shadowOffset = 0.0 0.0,
        attachment trailer
        {
            offset = 0.0 -0.2050 -1.5500,
            rotate = 0.0 0.0 0.0,
            zoffset = -1.0,
        }
        attachment trailerfront
        {
            offset = 0.0 -0.2050 1.5000,
            rotate = 0.0 0.0 0.0,
            zoffset = 1.0,
        }
    }
}
