module Base
{
    template vehicle ATA6Wheels
    {
        part TireMiddleRight
        {
            area = TireMiddleRight,
            wheel = RearLeft,
            model InflatedTirePlusWheel
            {
                file = ATAPetyarbuilt_WheelRear_R,
                offset = -1.3 0.0 0.0,
            }
        }
        part TireMiddleLeft
        {
            area = TireMiddleLeft,
            wheel = RearRight,
            model InflatedTirePlusWheel
            {
                file = ATAPetyarbuilt_WheelRear_L,
                offset = 1.3 0.0 0.0,
            }
        }
        part TireMiddle*
        {
            category = tire,
            itemType = Base.OldTire;Base.NormalTire;Base.ModernTire,
            container
            {
                capacity = 35,
                test = Vehicles.ContainerAccess.Tire,
                contentType = Air,
            }
            table install
            {
                items
                {
                    1
                    {
                        type = Base.Jack,
                        count = 1,
                        keep = true,
                    }
                    2
                    {
                        type = Base.LugWrench,
                        count = 1,
                        keep = true,
                        equip = primary,
                    }
                }
                time = 400,
                skills = Mechanics:1,
                test = Vehicles.InstallTest.Default,
                complete = Vehicles.InstallComplete.Tire,
            }
            table uninstall
            {
                items
                {
                    1
                    {
                        type = Base.Jack,
                        count = 1,
                        keep = true,
                    }
                    2
                    {
                        type = Base.LugWrench,
                        count = 1,
                        keep = true,
                        equip = primary,
                    }
                }
                time = 400,
                skills = Mechanics:1,
                test = Vehicles.UninstallTest.Default,
                complete = Vehicles.UninstallComplete.Tire,
            }
            lua
            {
                create = Vehicles.Create.Tire,
                init = Vehicles.Init.Tire,
                checkOperate = Vehicles.CheckOperate.Tire,
                update = Vehicles.Update.Tire,
            }
        }
        
        part BrakeMiddleLeft
        {
            area = TireMiddleLeft,
            table install
            {
                requireUninstalled = TireMiddleLeft,
            }
            table uninstall
            {
                requireUninstalled = TireMiddleLeft,
            }
        }

        part BrakeMiddleRight
        {
            area = TireMiddleRight,
            table install
            {
                requireUninstalled = TireMiddleRight,
            }
            table uninstall
            {
                requireUninstalled = TireMiddleRight,
            }
        }
        
        part Brake*
        {
            category = brakes,
            itemType = Base.OldBrake;Base.NormalBrake;Base.ModernBrake,
            table install
            {
                items
                {
                    1
                    {
                        type = Base.Jack,
                        count = 1,
                        keep = true,
                    }
                    2
                    {
                        type = Base.Wrench,
                        count = 1,
                        keep = true,
                        equip = primary,
                    }
                }
                time = 300,
                skills = Mechanics:3,
                recipes = Basic Mechanics,
                test = Vehicles.InstallTest.Default,
            }
            table uninstall
            {
                items
                {
                    1
                    {
                        type = Base.Jack,
                        count = 1,
                        keep = true,
                    }
                    2
                    {
                        type = Base.Wrench,
                        count = 1,
                        keep = true,
                        equip = primary,
                    }
                }
                time = 300,
                skills = Mechanics:3,
                recipes = Basic Mechanics,
                test = Vehicles.UninstallTest.Default,
            }
            lua
            {
                create = Vehicles.Create.Brake,
                update = Vehicles.Update.Brakes,
            }
        }
        
        part SuspensionMiddleLeft
        {
            area = TireMiddleLeft,
            table install
            {
                requireUninstalled = TireMiddleLeft,
            }
            table uninstall
            {
                requireUninstalled = TireMiddleLeft,
            }
        }

        part SuspensionMiddleRight
        {
            area = TireMiddleRight,
            table install
            {
                requireUninstalled = TireMiddleRight,
            }
            table uninstall
            {
                requireUninstalled = TireMiddleRight,
            }
        }

        part Suspension*
        {
            category = suspension,
            itemType = Base.NormalSuspension;Base.ModernSuspension,
            table install
            {
                items
                {
                    1
                    {
                        type = Base.Jack,
                        count = 1,
                        keep = true,
                    }
                    2
                    {
                        type = Base.Wrench,
                        count = 1,
                        keep = true,
                        equip = primary,
                    }
                }
                time = 300,
                skills = Mechanics:3,
                recipes = Basic Mechanics,
                test = Vehicles.InstallTest.Default,
            }
            table uninstall
            {
                items
                {
                    1
                    {
                        type = Base.Jack,
                        count = 1,
                        keep = true,
                    }
                    2
                    {
                        type = Base.Wrench,
                        count = 1,
                        keep = true,
                        equip = primary,
                    }
                }
                time = 300,
                skills = Mechanics:3,
                recipes = Basic Mechanics,
                test = Vehicles.UninstallTest.Default,
            }
            lua
            {
                create = Vehicles.Create.Default,
                update = Vehicles.Update.Suspension,
            }
        }
        
    }
}