module Base
{
        
    model Vehicle_ATA_Luton
    {
        mesh = vehicles/ATA_Luton_body|body,
        shader = vehicle_norandom_multiuv,
        invertX = FALSE,
        scale = 0.035,
    }
    model ATA_Luton_Wheel_R
    {
        mesh = vehicles/ATA_Luton_wheel,
        texture = Vehicles/ATA_Luton_wheel,
        shader = vehiclewheel,
        invertX = TRUE,
        scale = 0.035,
    }
    model ATA_Luton_Wheel_L
    {
        mesh = vehicles/ATA_Luton_wheel,
        texture = Vehicles/ATA_Luton_wheel,
        shader = vehiclewheel,
        invertX = FALSE,
        scale = 0.035,
    }
    model Vehicle_ATA_Luton_GasTank
    {
        mesh = vehicles/ATA_Luton_body|GasTank,
        shader = vehicle_norandom_multiuv,
        invertX = FALSE,
        scale = 0.035,
    }
    model Vehicle_ATA_Luton_DoorFrontLeft
    {
        mesh = vehicles/ATA_Luton_body|DoorFrontLeft,
        shader = vehicle_norandom_multiuv,
        invertX = FALSE,
        scale = 0.035,
    }
    model Vehicle_ATA_Luton_DoorFrontRight
    {
        mesh = vehicles/ATA_Luton_body|DoorFrontRight,
        shader = vehicle_norandom_multiuv,
        invertX = FALSE,
        scale = 0.035,
    }
    
    template vehicle ATA_Luton
    {
        
        mechanicType = 2,
        engineRepairLevel = 5,
        playerDamageProtection = 1.1,
        engineRPMType = van,

        model
        {
            file = Vehicle_ATA_Luton,
            scale = 1.3000,
            offset = 0.0000 0.0385 0.1231,
        }

        textureMask = Vehicles/ATA_Luton_mask,
        textureLights = Vehicles/ATA_Luton_lights,
        textureDamage1Overlay = Vehicles/ATA_Luton_blood,
        textureDamage2Overlay = Vehicles/ATA_Luton_blood,
        textureDamage1Shell = Vehicles/ATA_Luton_damage1,
        textureDamage2Shell = Vehicles/ATA_Luton_damage2,
        textureRust = Vehicles/ATA_Luton_rust,

        sound
        {
            backSignal = VehicleBackUpBeeper,
            engine = VehicleEngineVan,
            engineStart = VehicleEngineVan,
            engineTurnOff = VehicleEngineVan,
            horn = VehicleHornVan,
            ignitionFail = VehicleIgnitionFailVan,
        }

        extents = 1.3692 1.6769 4.2154,
        mass = 816,
        physicsChassisShape = 1.3692 1.6769 4.2154,
        centerOfMassOffset = 0.0000 0.8077 0.1308,
        shadowExtents = 1.4867 4.5467,
        shadowOffset = 0.0000 0.1200,
        engineForce = 4500,
        engineQuality = 70,
        engineLoudness = 100,
        maxSpeed = 65f,
        brakingForce = 70,
        stoppingMovementForce = 5.0f,
        rollInfluence = 0.7f,
        steeringIncrement = 0.03,
        steeringClamp = 0.3,
        suspensionStiffness = 50,
        suspensionCompression = 1.83,
        suspensionDamping = 2.88,
        maxSuspensionTravelCm = 10,
        suspensionRestLength = 0.4,
        wheelFriction = 1.4f,
        frontEndHealth = 150,
        rearEndHealth = 150,
        seats = 4,
        isSmallVehicle = false,

        wheel FrontLeft
        {
            front = true,
            offset = 0.5462 -0.0385 1.5615,
            radius = 0.2f,
            width = 0.2f,
        }

        wheel FrontRight
        {
            front = true,
            offset = -0.5462 -0.0385 1.5615,
            radius = 0.2f,
            width = 0.2f,
        }

        wheel RearLeft
        {
            front = false,
            offset = 0.5769 -0.0385 -0.8923,
            radius = 0.2f,
            width = 0.2f,
        }

        wheel RearRight
        {
            front = false,
            offset = -0.5769 -0.0385 -0.8923,
            radius = 0.2f,
            width = 0.2f,
        }

        template = PassengerSeat4,

        passenger FrontLeft
        {
            position inside
            {
                offset = 0.2769 0.4692 1.0308,
                rotate = 0.0000 0.0000 0.0000,
            }

            position outside
            {
                offset = 0.8769 -0.2538 1.0308,
                rotate = 0.0000 0.0000 0.0000,
                area = SeatFrontLeft,
            }

            switchSeat RearLeft
            {
            }

            switchSeat RearRight
            {
            }
        }

        passenger FrontRight
        {
            position inside
            {
                offset = -0.2769 0.4692 1.0308,
                rotate = 0.0000 0.0000 0.0000,
            }

            position outside
            {
                offset = -0.8692 -0.2538 1.0308,
                rotate = 0.0000 0.0000 0.0000,
                area = SeatFrontRight,
            }

            switchSeat RearLeft
            {
            }

            switchSeat RearRight
            {
            }
        }

        passenger RearLeft
        {
            door = DoorRear,
            door2 = DoorRear,

            position inside
            {
                offset = 0.0000 0.4692 -0.1231,
                rotate = 0.0000 0.0000 0.0000,
            }

            position outside
            {
                offset = 0.0000 -0.2538 -2.3231,
                rotate = 0.0000 0.0000 0.0000,
                area = TruckBed,
            }

            switchSeat FrontLeft
            {
            }

            switchSeat FrontRight
            {
            }
        }

        passenger RearRight
        {
            door = DoorRear,
            door2 = DoorRear,

            position inside
            {
                offset = 0.0000 0.4692 -1.4615,
                rotate = 0.0000 0.0000 0.0000,
            }

            position outside
            {
                offset = 0.0000 -0.2538 -2.3231,
                rotate = 0.0000 0.0000 0.0000,
                area = TruckBed,
            }

            switchSeat FrontLeft
            {
            }

            switchSeat FrontRight
            {
            }
        }

        area Engine
        {
            xywh = 0.0000 2.3462 1.1846 0.5077,
        }

        area TruckBed
        {
            xywh = 0.0000 -2.3077 1.3385 0.6615,
        }

        area SeatFrontLeft
        {
            xywh = 0.9308 1.1846 0.5077 0.5077,
        }

        area SeatFrontRight
        {
            xywh = -0.9308 1.1846 0.5077 0.5077,
        }

        area GasTank
        {
            xywh = 0.9308 0.5923 0.5077 0.5077,
        }

        area TireFrontLeft
        {
            xywh = 0.9308 1.6846 0.5077 0.5077,
        }

        area TireFrontRight
        {
            xywh = -0.9308 1.6846 0.5077 0.5077,
        }

        area TireRearLeft
        {
            xywh = 0.9308 -0.7692 0.5077 0.5077,
        }

        area TireRearRight
        {
            xywh = -0.9308 -0.7692 0.5077 0.5077,
        }

        template = Seat/part/SeatFrontLeft,
        template = Seat/part/SeatFrontRight,

        part Seat*
        {
            table install
            {
                skills = Mechanics:2,
                recipes = Intermediate Mechanics,
            }

            table uninstall
            {
                skills = Mechanics:2,
                recipes = Intermediate Mechanics,
            }
        }

        template = Seat/part/SeatRearLeft,
        template = Seat/part/SeatRearRight,

        part SeatRear*
        {
            category = nodisplay,

            container
            {
                test = ATATuning.ContainerAccess.BlockSeat,
            }
        }

        template = GloveBox,
        template = GasTank,

        part GasTank
        {
            model Default
            {
                file = Vehicle_ATA_Luton_GasTank,
            }
            install
            {
                skills = Mechanics:7,
                recipes = Intermediate Mechanics,
            }

            uninstall
            {
                skills = Mechanics:7,
                recipes = Intermediate Mechanics,
            }
        }

        template = Battery,
        template = Engine,
        template = Muffler,

        part Muffler
        {
            table install
            {
                recipes = Intermediate Mechanics,
            }

            table uninstall
            {
                recipes = Intermediate Mechanics,
            }
        }

        template = Heater,
        template = PassengerCompartment,
        
        
        template = EngineDoor,
        part EngineDoor
        {
            anim Open
            {
                sound = VehicleHoodOpenVan,
            }

            anim Close
            {
                sound = VehicleHoodCloseVan,
            }

            table install
            {
                recipes = Intermediate Mechanics,
            }

            table uninstall
            {
                recipes = Intermediate Mechanics,
            }
        }
        
        template = Door/part/DoorFrontLeft,
        part DoorFrontLeft
        {
            model Default
            {
                file = Vehicle_ATA_Luton_DoorFrontLeft,
            }
        }
        
        template = Door/part/DoorFrontRight,
        part DoorFrontRight
        {
            model Default
            {
                file = Vehicle_ATA_Luton_DoorFrontRight,
            }
        }
        
        template = Door/part/DoorRear,

        part Door*
        {
            anim Open
            {
                sound = VehicleDoorOpenVan,
            }

            anim Close
            {
                sound = VehicleDoorCloseVan,
            }

            anim Lock
            {
                sound = LockVehicleDoorVan,
            }

            anim Unlock
            {
                sound = UnlockVehicleDoorVan,
            }

            anim IsLocked
            {
                sound = VehicleDoorIsLockedVan,
            }

            table install
            {
                recipes = Intermediate Mechanics,
            }

            table uninstall
            {
                recipes = Intermediate Mechanics,
            }
        }
        
        part DoorRear
        {
            anim Open
            {
                sound = VehicleTrunkOpenVan,
            }

            anim Close
            {
                sound = VehicleTrunkCloseVan,
            }

            table uninstall
            {
                skills = Mechanics:6,
            }

            hasLightsRear = false,

            lua
            {
                create = Vehicles.Create.TrunkDoor,
                init = Vehicles.Init.Door,
                update = Vehicles.Update.TrunkDoor,
                use = Vehicles.Use.Door,
            }
        }
        
        template = Windshield/part/Windshield,
        part Windshield
        {
            table install
            {
                recipes = Intermediate Mechanics,
            }
            table uninstall
            {
                recipes = Intermediate Mechanics,
            }
        }
        
        template = Window/part/WindowFrontLeft,
        template = Window/part/WindowFrontRight,
        
        part Window*
        {
            table uninstall
            {
                recipes = Intermediate Mechanics,
            }
            table install
            {
                recipes = Intermediate Mechanics,
            }
        }
        
        template! = ATA_Luton_Template_Protection,
        template! = ATA_Luton_Template_RoofRack,
        template = Tire,

        part TireFrontLeft
        {
            model InflatedTirePlusWheel
            {
                file = ATA_Luton_Wheel_L,
            }
        }

        part TireFrontRight
        {
            model InflatedTirePlusWheel
            {
                file = ATA_Luton_Wheel_R,
            }
        }

        part TireRearLeft
        {
            model InflatedTirePlusWheel
            {
                file = ATA_Luton_Wheel_L,
            }
        }

        part TireRearRight
        {
            model InflatedTirePlusWheel
            {
                file = ATA_Luton_Wheel_R,
            }
        }

        template = Brake,

        part Brake*
        {
            table install
            {
                skills = Mechanics:6,
                recipes = Intermediate Mechanics,
            }

            table uninstall
            {
                skills = Mechanics:6,
                recipes = Intermediate Mechanics,
            }
        }

        template = Suspension,

        part Suspension*
        {
            table install
            {
                skills = Mechanics:6,
                recipes = Intermediate Mechanics,
            }

            table uninstall
            {
                skills = Mechanics:6,
                recipes = Intermediate Mechanics,
            }
        }

        template = Radio,
        template = Headlight,
        template = Freeplace/part/Freeplace1RearLeft,
        template = Freeplace/part/Freeplace2RearLeft,
        template = Freeplace/part/Freeplace3RearLeft,
        template = Freeplace/part/Freeplace1RearRight,
        template = Freeplace/part/Freeplace2RearRight,
        template = Freeplace/part/Freeplace3RearRight,

        part Freeplace*
        {
            area = TruckBed,
        }

        template = Freeplace/part/FreestorageRearLeft,
        template = Freeplace/part/FreestorageRearRight,

        attachment trailer
        {
            offset = 0.0000 0.0462 -2.2154,
            rotate = 0.0000 0.0000 0.0000,
            zoffset = -1.0000,
        }

        attachment trailerfront
        {
            offset = 0.0000 -0.0133 2.1667,
            rotate = 0.0000 0.0000 0.0000,
            zoffset = 1.0000,
        }
    }
}