module Base
{
	model PU_Chains_FL_Trailermovingmedium
    {
        mesh = vehicles/TrailermovingmediumArmor|chaintires,
        texture = Vehicles/puv_parts,
        shader = vehiclewheel,
        scale = 0.0035,
    }

	model PU_Chains_FR_Trailermovingmedium
    {
        mesh = vehicles/TrailermovingmediumArmor|chaintires,
        texture = Vehicles/puv_parts,
        shader = vehiclewheel,
        scale = 0.0035,
        invertX = TRUE,
    }

	model PU_Trunk_Trailermovingmedium_Light
    {
        mesh = vehicles/TrailermovingmediumArmor|trunklightrear,
        texture = Vehicles/puv_parts,
        shader = vehiclewheel,
        scale = 0.004525,
    }

	model PU_Trunk_Trailermovingmedium_Heavy
    {
        mesh = vehicles/TrailermovingmediumArmor|trunkheavyrear,
        texture = Vehicles/puv_parts,
        shader = vehiclewheel,
        scale = 0.004525,
    }

	model PU_Rack_Trailermovingmedium
    {
        mesh = vehicles/TrailermovingmediumArmor|roofrack,
        texture = Vehicles/puv_parts,
        shader = vehiclewheel,
        scale = 0.004525,
    }

	template vehicle PU_Armor_Trailermovingmedium
	{
        template = ATA2Protection/part/ATA2ProtectionTrunk,
        part ATA2ProtectionTrunk
        {
            model Light
            {
                file = PU_Trunk_Trailermovingmedium_Light,
            }
            model Heavy
            {
                file = PU_Trunk_Trailermovingmedium_Heavy,
            }
        }

        part Tire*
        {
            setAllModelsVisible = false,
            table install
            {
                complete = ATATuning2.InstallComplete.TireNotAllModelsVisible,
            }
            
            table uninstall
            {
                complete = ATATuning2.UninstallComplete.TireNotAllModelsVisible,
            }
            
            lua
            {
                create = ATATuning2.Create.TireNotAllModelsVisible,
                init = ATATuning2.Init.TireNotAllModelsVisible,
                checkOperate = Vehicles.CheckOperate.Tire,
                update = Vehicles.Update.Tire,
            }
        }

        template = ATA2Protection/part/ATA2ProtectionWheels,
        part TireFrontLeft
        {
            model ATAProtection
            {
                file = PU_Chains_FL_Trailermovingmedium,
            }
        }

        part TireFrontRight
        {
            model ATAProtection
            {
                file = PU_Chains_FR_Trailermovingmedium,
            }
        }

        template = ATA2InteractiveTrunk/part/ATA2InteractiveTrunkRoofRack,
        part ATA2InteractiveTrunkRoofRack
        {
            model Default
            {
                file = PU_Rack_Trailermovingmedium,
            }
        }
	}
}