module Base
{

    model 86fordE150windshield
    {
        mesh = vehicles/Vehicles_86fordE150_Body|e150_windshield,
        shader = damn_vehicle_shader,
        scale = 0.1,
    }

    model 86fordE150rearWindshield
	{
		mesh = vehicles/Vehicles_86fordE150_Body|e150_windshieldRear,
		shader = damn_vehicle_shader,
		static = FALSE,
		scale = 0.1,
	}

	template vehicle E150Windshield
	{

        part Windshield
        {
            model windshieldFront
            {
            file = 86fordE150windshield,
            }
            window
            {
            openable = false,
            }
            table uninstall
                {
                    requireUninstalled = DAMNWindshieldArmor,
                }
                
            itemType = Base.E150Windshield,
            area = Engine,
            category = bodywork,
            mechanicRequireKey = false,
            durability = 2,
            table install
            {
                items
                {
                    1
                    {
                        tags = Screwdriver,
                        count = 1,
                        keep = true,
			            equip = primary,
                    }
                }
                time = 600,
                skills = Mechanics:5,
                recipes = Intermediate Mechanics,
                test = Vehicles.InstallTest.Default,
                complete = Vehicles.InstallComplete.Window,
            }
            table uninstall
            {
                items
                {
                    1
                    {
                        tags = Screwdriver,
                        count = 1,
                        keep = true,
						equip = primary,
                    }
                }
                time = 600,
                  skills = Mechanics:5,
                  recipes = Intermediate Mechanics,
                test = Vehicles.UninstallTest.Default,
            }
            lua
            {
                create = Vehicles.Create.Default,
            }
        }

    }

    template vehicle E150RearWindshield
	{
		part WindshieldRear
		{

			model RearWindshield15684846
			{
				file = 86fordE150rearWindshield,
				offset = 0 0 0,
				rotate = 0 0 0,
				scale = 1.0,
			}

			category = bodywork,
			area = TruckBed,
			parent = TrunkDoor,

			anim Close
			{
				anim = trunk_opening,
				rate = 0.85,
			}

			anim Open
			{
				anim = trunk_opening,
				reverse = TRUE,
				rate = 0.5,
			}

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

			anim Opened
			{
				anim = trunk_opening,
				animate = FALSE,
			}

			window
            {
            openable = false,
            }
			anim Open
			{
				sound = VehicleTrunkOpenStandard,
			}
			anim Close
			{
				sound = VehicleTrunkCloseStandard,
			}
			anim Lock
			{
				sound = LockVehicleDoorStandard,
			}
			anim Unlock
			{
				sound = UnlockVehicleDoorStandard,
			}
			anim IsLocked
			{
				sound = VehicleDoorIsLockedStandard,
			}
			anim ActorOpen
			{
				anim = WindowOpenSuccess,
				rate = 0.15,
				angle = 0.0 0.0 0.0,
			}
			anim ActorClose
			{
				anim = Attack_Shove,
				rate = 0.3,
				angle = 0.0 0.0 0.0,
			}
			itemType = Base.E150RearWindshield,
			mechanicRequireKey = true,
            durability = 2,
			repairMechanic = true,
			table install
			{
				items
				{
					item
					{
						tags = Wrench,
						count = 1,
						keep = true,
						equip = primary,
					}
				}
				time = 500,
				skills = Mechanics:2,
				recipes = Intermediate Mechanics,
				test = Vehicles.InstallTest.Default,
				complete = Vehicles.InstallComplete.Window,
			}
			table uninstall
			{
				items
				{
					item
					{
						tags = Wrench,
						count = 1,
						keep = true,
						equip = primary,
					}
				}
				time = 500,
				skills = Mechanics:2,
				recipes = Intermediate Mechanics,
				test = Vehicles.UninstallTest.Default,
				requireUninstalled = DAMNWindshieldRearArmor,
			}
			lua
			{
				create = Vehicles.Create.Default,
			}
		}
	}

    template vehicle E150RearWindshieldLong
	{
		part WindshieldRear
		{

			model RearLongBoi415777845
			{
				file = 86fordE150rearWindshield,
				offset = 0.0000 0.0000 -0.3726,
				rotate = 0 0 0,
				scale = 1.0,
			}

			category = bodywork,
			area = TruckBed,
			parent = TrunkDoor,

			anim Close
			{
				anim = trunk_opening,
				rate = 0.85,
			}

			anim Open
			{
				anim = trunk_opening,
				reverse = TRUE,
				rate = 0.5,
			}

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

			anim Opened
			{
				anim = trunk_opening,
				animate = FALSE,
			}

			window
            {
            openable = false,
            }
			anim Open
			{
				sound = VehicleTrunkOpenStandard,
			}
			anim Close
			{
				sound = VehicleTrunkCloseStandard,
			}
			anim Lock
			{
				sound = LockVehicleDoorStandard,
			}
			anim Unlock
			{
				sound = UnlockVehicleDoorStandard,
			}
			anim IsLocked
			{
				sound = VehicleDoorIsLockedStandard,
			}
			anim ActorOpen
			{
				anim = WindowOpenSuccess,
				rate = 0.15,
				angle = 0.0 0.0 0.0,
			}
			anim ActorClose
			{
				anim = Attack_Shove,
				rate = 0.3,
				angle = 0.0 0.0 0.0,
			}
			itemType = Base.E150RearWindshield,
			mechanicRequireKey = true,
            durability = 2,
			repairMechanic = true,
			table install
			{
				items
				{
					item
					{
						tags = Wrench,
						count = 1,
						keep = true,
						equip = primary,
					}
				}
				time = 500,
				skills = Mechanics:2,
				recipes = Intermediate Mechanics,
				test = Vehicles.InstallTest.Default,
				complete = Vehicles.InstallComplete.Window,
			}
			table uninstall
			{
				items
				{
					item
					{
						tags = Wrench,
						count = 1,
						keep = true,
						equip = primary,
					}
				}
				time = 500,
				skills = Mechanics:2,
				recipes = Intermediate Mechanics,
				test = Vehicles.UninstallTest.Default,
				requireUninstalled = DAMNWindshieldRearArmor,

			}
			lua
			{
				create = Vehicles.Create.Default,
			}
		}
	}
}
