module Base
{
    template vehicle M911Headlights
    {
        part HeadlightLeft
        {
            mechanicArea = Engine,
            area = Engine,
        }
        part HeadlightRight
        {
            mechanicArea = Engine,
            area = Engine,
        }
        part HeadlightRearLeft
        {
            mechanicArea = Back,
            area = TruckBed,
        }
        part HeadlightRearRight
        {
            mechanicArea = Back,
            area = TruckBed,
        }
        part Headlight*
        {
            category = lights,
            specificItem = false,
            itemType = Base.LightBulb,
            mechanicRequireKey = true,
            durability = 1,
            table install
            {
                items
                {
                    1
                    {
                        tags = base:screwdriver,
                        count = 1,
                        keep = true,
                        equip = primary,
                    }
                }
                time = 100,
                test = Vehicles.InstallTest.Default,
            }
            table uninstall
            {
                items
                {
                    1
                    {
                        tags = base:screwdriver,
                        count = 1,
                        keep = true,
                        equip = primary,
                    }
                }
                time = 100,
                test = Vehicles.UninstallTest.Default,
            }
            table headlight
            {
                xOffset = 0.5,
                yOffset = 2.0,
                distance = 50,
                intensity = 0.95,
            }
            lua
            {
                create = Vehicles.Create.Headlight,
                init = Vehicles.Init.Headlight,
                update = Vehicles.Update.Headlight,
            }
        }
    }
}
