module Base
{
    model 67gt500doorfl
    {
        mesh = vehicles/Vehicles_67gt500_Body|gt500_door_fl,
        shader = damn_vehicle_shader,
        static = FALSE,
        scale = 0.1,
        boneWeight = door_fl_bone 1.0,
    }

    model 67gt500doorfr
    {
        mesh = vehicles/Vehicles_67gt500_Body|gt500_door_fr,
        shader = damn_vehicle_shader,
        static = FALSE,
        scale = 0.1,
        boneWeight = door_fr_bone 1.0,
    }

    template vehicle GT500Doors
    {
        part DoorFrontLeft
        {
            model DoorFrontLeftcm
            {
                file = 67gt500doorfl,
            }
            itemType = Base.67gt500Door,
            table uninstall
            {
                requireUninstalled = WindowFrontLeft,
            }
            area = SeatFrontLeft,
            category = door,
            anim ActorOpen
            {
                angle = 0.0 270.0 0.0,
            }
            anim ActorClose
            {
                angle = 0.0 270.0 0.0,
            }
            anim Close
            {
                anim = door_fl_opening,
                reverse = TRUE,
                rate = 1.5,
            }
            anim Open
            {
                anim = door_fl_opening,
                rate = 1.0,
            }
            anim Closed
            {
                anim = door_fl_opening,
                animate = FALSE,
            }
            anim Opened
            {
                anim = door_fl_opening,
                reverse = TRUE,
                animate = FALSE,
            }
            lua
            {
                create = Vehicles.Create.Door,
                init = Vehicles.Init.Door,
                use = Vehicles.Use.Door,
            }
        }

        part DoorFrontRight
        {
            model DoorFrontRightcm
            {
                file = 67gt500doorfr,
            }
            itemType = Base.67gt500Door,
            table uninstall
            {
                requireUninstalled = WindowFrontRight,
            }
            area = SeatFrontRight,
            category = door,
            anim ActorOpen
            {
                angle = 0.0 90.0 0.0,
            }
            anim ActorClose
            {
                angle = 0.0 90.0 0.0,
            }
            anim Close
            {
                anim = door_fr_opening,
                reverse = TRUE,
                rate = 1.5,
            }
            anim Open
            {
                anim = door_fr_opening,
                rate = 1.0,
            }
            anim Closed
            {
                anim = door_fr_opening,
                animate = FALSE,
            }
            anim Opened
            {
                anim = door_fr_opening,
                reverse = TRUE,
                animate = FALSE,
            }
            lua
            {
                create = Vehicles.Create.Door,
                init = Vehicles.Init.Door,
                use = Vehicles.Use.Door,
            }
        }

        part Door*
        {
            door
            {
            }
            anim Open
            {
                sound = VehicleDoorOpenStandard,
            }
            anim Close
            {
                sound = VehicleDoorCloseStandard,
            }
            anim Lock
            {
                sound = LockVehicleDoorStandard,
            }
            anim Unlock
            {
                sound = UnlockVehicleDoorStandard,
            }
            anim IsLocked
            {
                sound = VehicleDoorIsLockedStandard,
            }
            anim ActorOpen
            {
                anim = Attack_Shove,
                rate = 0.3,
            }
            anim ActorClose
            {
                anim = Attack_Shove,
                rate = 0.3,
            }
            mechanicRequireKey = true,
            durability = 5,
            table install
            {
                items
                {
                    item
                    {
                        tags = Wrench,
                        count = 1,
                        keep = true,
                        equip = primary,
                    }
                }
                time = 700,
                skills = Mechanics:4,
                recipes = Intermediate Mechanics,
                test = Vehicles.InstallTest.Default,
                complete = Vehicles.InstallComplete.Door,
            }
            table uninstall
            {
                items
                {
                    item
                    {
                        tags = Wrench,
                        count = 1,
                        keep = true,
                        equip = primary,
                    }
                }
                time = 700,
                skills = Mechanics:4,
                recipes = Intermediate Mechanics,
                test = Vehicles.UninstallTest.Default,
                complete = Vehicles.UninstallComplete.Door,
            }
        }
    }
}