module Base
{
	model PU_FL_Window_StepVan_Light
    {
        mesh = vehicles/StepVanArmor|windowfrontlightleft,
        texture = Vehicles/puv_parts,
        shader = vehiclewheel,
        scale = 0.004,
    }

	model PU_FR_Window_StepVan_Light
    {
        mesh = vehicles/StepVanArmor|windowfrontlightleft,
        texture = Vehicles/puv_parts,
        shader = vehiclewheel,
        scale = 0.004,
        invertX = TRUE,
    }

	model PU_F_Window_StepVan_Light
    {
        mesh = vehicles/StepVanArmor|windowlightfront,
        texture = Vehicles/puv_parts,
        shader = vehiclewheel,
        scale = 0.004,
    }

	model PU_R_Window_StepVan_Light
    {
        mesh = vehicles/StepVanArmor|windowlightrear,
        texture = Vehicles/puv_parts,
        shader = vehiclewheel,
        scale = 0.004,
    }

	model PU_FL_Window_StepVan_Heavy
    {
        mesh = vehicles/StepVanArmor|windowfrontheavyleft,
        texture = Vehicles/puv_parts,
        shader = vehiclewheel,
        scale = 0.004,
    }

	model PU_FR_Window_StepVan_Heavy
    {
        mesh = vehicles/StepVanArmor|windowfrontheavyleft,
        texture = Vehicles/puv_parts,
        shader = vehiclewheel,
        scale = 0.004,
        invertX = TRUE,
    }

	model PU_F_Window_StepVan_Heavy
    {
        mesh = vehicles/StepVanArmor|windowheavyfront,
        texture = Vehicles/puv_parts,
        shader = vehiclewheel,
        scale = 0.004,
    }

	model PU_R_Window_StepVan_Heavy
    {
        mesh = vehicles/StepVanArmor|windowheavyrear,
        texture = Vehicles/puv_parts,
        shader = vehiclewheel,
        scale = 0.004,
    }

	model PU_Bullbar_StepVan
    {
        mesh = vehicles/StepVanArmor|pushbar_1,
        texture = Vehicles/puv_parts,
        shader = vehiclewheel,
        scale = 0.004,
    }

	model PU_Chains_FL_StepVan
    {
        mesh = vehicles/StepVanArmor|chaintires,
        texture = Vehicles/puv_parts,
        shader = vehiclewheel,
        scale = 0.0035,
    }

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

	model PU_Chains_RL_StepVan
    {
        mesh = vehicles/StepVanArmor|chaintires,
        texture = Vehicles/puv_parts,
        shader = vehiclewheel,
        scale = 0.0035,
    }

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

	model PU_Hood_StepVan_Light
    {
        mesh = vehicles/StepVanArmor|hoodlightfront,
        texture = Vehicles/puv_parts,
        shader = vehiclewheel,
        scale = 0.004,
    }

	model PU_Door_R_StepVan_Light
    {
        mesh = vehicles/StepVanArmor|doorlightrear,
        texture = Vehicles/puv_parts,
        shader = vehiclewheel,
        scale = 0.004,
    }

	model PU_Door_FL_StepVan_Light
    {
        mesh = vehicles/StepVanArmor|doorlightleft,
        texture = Vehicles/puv_parts,
        shader = vehiclewheel,
        scale = 0.004,
    }

	model PU_Door_FR_StepVan_Light
    {
        mesh = vehicles/StepVanArmor|doorlightleft,
        texture = Vehicles/puv_parts,
        shader = vehiclewheel,
        scale = 0.004,
        invertX = TRUE,
    }

	model PU_Hood_StepVan_Heavy
    {
        mesh = vehicles/StepVanArmor|hoodheavyfront,
        texture = Vehicles/puv_parts,
        shader = vehiclewheel,
        scale = 0.004,
    }

	model PU_Door_R_StepVan_Heavy
    {
        mesh = vehicles/StepVanArmor|doorheavyrear,
        texture = Vehicles/puv_parts,
        shader = vehiclewheel,
        scale = 0.004,
    }

	model PU_Door_FL_StepVan_Heavy
    {
        mesh = vehicles/StepVanArmor|doorheavyleft,
        texture = Vehicles/puv_parts,
        shader = vehiclewheel,
        scale = 0.004,
    }

	model PU_Door_FR_StepVan_Heavy
    {
        mesh = vehicles/StepVanArmor|doorheavyleft,
        texture = Vehicles/puv_parts,
        shader = vehiclewheel,
        scale = 0.004,
        invertX = TRUE,
    }

	model PU_Rack_StepVan
    {
        mesh = vehicles/StepVanArmor|roofrack,
        texture = Vehicles/puv_parts,
        shader = vehiclewheel,
        scale = 0.004,
    }

	template vehicle PU_Armor_StepVan_IceCream
	{
        template = ATA2Protection/part/ATA2ProtectionWindowFrontLeft,
		part ATA2ProtectionWindowFrontLeft
		{
			model Light
			{
				file = PU_FL_Window_StepVan_Light,
			}
			model Heavy
			{
				file = PU_FL_Window_StepVan_Heavy,
			}
		}

        template = ATA2Protection/part/ATA2ProtectionWindowFrontRight,
		part ATA2ProtectionWindowFrontRight
		{
			model Light
			{
				file = PU_FR_Window_StepVan_Light,
			}
			model Heavy
			{
				file = PU_FR_Window_StepVan_Heavy,
			}
		}

        template = ATA2Protection/part/ATA2ProtectionWindshield,
        part ATA2ProtectionWindshield
        {
            model Light
            {
                file = PU_F_Window_StepVan_Light,
            }
            model Heavy
            {
                file = PU_F_Window_StepVan_Heavy,
            }
        }

        template = ATA2Protection/part/ATA2ProtectionWindshieldRear,
        part ATA2ProtectionWindshieldRear
        {
            model Light
            {
                file = PU_R_Window_StepVan_Light,
            }
            model Heavy
            {
                file = PU_R_Window_StepVan_Heavy,
            }
        }

        template = ATA2Protection/part/ATA2ProtectionDoorsRear,
        part ATA2ProtectionDoorsRear
        {
            model Light
            {
                file = PU_Door_R_StepVan_Light,
            }
            model Heavy
            {
                file = PU_Door_R_StepVan_Heavy,
            }
        }

        template = ATA2Protection/part/ATA2ProtectionDoorFrontLeft,
        part ATA2ProtectionDoorFrontLeft
        {
            model Light
            {
                file = PU_Door_FL_StepVan_Light,
            }
            model Heavy
            {
                file = PU_Door_FL_StepVan_Heavy,
            }
        }

        template = ATA2Protection/part/ATA2ProtectionDoorFrontRight,
        part ATA2ProtectionDoorFrontRight
        {
            model Light
            {
                file = PU_Door_FR_StepVan_Light,
            }
            model Heavy
            {
                file = PU_Door_FR_StepVan_Heavy,
            }
        }

        template = ATA2Protection/part/ATA2ProtectionHood,
        part ATA2ProtectionHood
        {
            model Light
            {
                file = PU_Hood_StepVan_Light,
            }
            model Heavy
            {
                file = PU_Hood_StepVan_Heavy,
            }
        }

        template = ATA2Bullbars/part/ATA2Bullbar,
        part ATA2Bullbar
        {
            model Default
            {
                file = PU_Bullbar_StepVan,
            }
        }

        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_StepVan,
            }
        }

        part TireRearLeft
        {
            model ATAProtection
            {
                file = PU_Chains_RL_StepVan,
            }
        }

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

        part TireRearRight
        {
            model ATAProtection
            {
                file = PU_Chains_RR_StepVan,
            }
        }
		part EngineDoor
		{
			anim Open
			{
				sound = VehicleHoodOpenVan,
			}

			anim Close
			{
				sound = VehicleHoodCloseVan,
			}

			table install
			{
				recipes = Intermediate Mechanics,
			}

			table uninstall
			{
				recipes = Intermediate Mechanics,
			}

			model Default
			{
				file = IceCream_Hood2,
				rotate = 0 0 0,
			}

			anim Close
			{
				anim = Hood_Closing,
				reverse = TRUE,
				animate = FALSE,
				rate = 2.5,
			}

			anim Open
			{
				anim = Hood_Closing,
				animate = FALSE,
				rate = 2.0,
			}

			anim Closed
			{
				anim = Hood_Closing,
				reverse = TRUE,
				animate = FALSE,
			}

			anim Opened
			{
				anim = Hood_Closing,
				reverse = TRUE,
				animate = FALSE,
			}			
		}

		part DoorFrontLeft
		{
			model Default
			{
				file = IceCream_DoorFrontLeft2,
			}

			anim Close
			{
				anim = DoorFL_Closing,
				reverse = TRUE,
				animate = FALSE,
				rate = 2.5,
			}

			anim Open
			{
				anim = DoorFL_Closing,
				animate = FALSE,
				rate = 2.0,
			}

			anim Closed
			{
				anim = DoorFL_Closing,
				reverse = TRUE,
				animate = FALSE,
			}

			anim Opened
			{
				anim = DoorFL_Closing,
				reverse = TRUE,
				animate = FALSE,
			}
		}

		part DoorFrontRight
		{
			model Default
			{
				file = IceCream_DoorFrontRight2,
			}

			anim Close
			{
				anim = DoorFR_Closing,
				reverse = TRUE,
				animate = FALSE,
				rate = 2.5,
			}

			anim Open
			{
				anim = DoorFR_Closing,
				animate = FALSE,
				rate = 2.0,
			}

			anim Closed
			{
				anim = DoorFR_Closing,
				reverse = TRUE,
				animate = FALSE,
			}

			anim Opened
			{
				anim = DoorFR_Closing,
				reverse = TRUE,
				animate = FALSE,
			}
		}
		
		part DoorRear
		{
			table install
			{
				recipes = Advanced Mechanics,
			}

			table uninstall
			{
				recipes = Advanced Mechanics,
			}

			model
			{
				file = IceCream_TrunkL2,
				offset = 0 0 0,
				rotate = 0 0 0,
				scale = 1.0,
			}

			anim Close
			{
				sound = VehicleTrunkCloseVan,			
				anim = RearDoors_Closing,
				reverse = TRUE,
				animate = FALSE,
				rate = 2.5,
			}

			anim Open
			{
				sound = VehicleTrunkOpenVan,			
				anim = RearDoors_Closing,
				animate = FALSE,
				rate = 2.0,
			}

			anim Closed
			{
				anim = RearDoors_Closing,
				reverse = TRUE,
				animate = FALSE,
			}

			anim Opened
			{
				anim = RearDoors_Closing,
				reverse = TRUE,
				animate = FALSE,
			}
			
			hasLightsRear = false,
		}
	}
}