module Base
{

	model 93chevySuburbanHood
	{
		mesh = vehicles/Vehicles_93chevySuburban_Body|sub93_hood,
		shader = damn_vehicle_shader,
		static = FALSE,
		scale = 0.1,
	}

	model 93chevySuburbanBugGuard
	{
		mesh = vehicles/Vehicles_93chevySuburban_Body|sub93_bugGuard,
		shader = damn_vehicle_shader,
		static = FALSE,
		scale = 0.1,
	}

	template vehicle SUB93EngineDoor
	{
		part EngineDoor
		{

			model inthehood
			{
				file = 93chevySuburbanHood,
			}

			anim Close
			{
				anim = hood_opening,
				reverse = TRUE,
				rate = 0.70,
			}

			anim Open
			{
				anim = hood_opening,
				rate = 1.25,
			}

			anim Closed
			{
				anim = hood_opening,
				animate = FALSE,
			}

			anim Opened
			{
				anim = hood_opening,
				reverse = TRUE,
				animate = FALSE,
			}
		
			category = bodywork,
			area = Engine,
			door
			{
			}
			anim Open
			{
				sound = VehicleHoodOpenStandard,
			}
			anim Close
			{
				sound = VehicleHoodCloseStandard,
			}

			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 180.0 0.0,
			}

			itemType = Base.93chevySuburbanEngineDoor,
			mechanicRequireKey = true,
			repairMechanic = true,
			table install
			{
				items
				{
					1
					{
						type = Base.Wrench,
						count = 1,
						keep = true,
						equip = primary,
					}
				}
				time = 1000,
				skills = Mechanics:2,
				recipes = Intermediate Mechanics,
				test = Vehicles.InstallTest.Default,
				complete = Vehicles.InstallComplete.Door,
			}
			table uninstall
			{
				items
				{
					1
					{
						type = Base.Wrench,
						count = 1,
						keep = true,
						equip = primary,
					}
				}
				time = 1000,
				skills = Mechanics:2,
				recipes = Intermediate Mechanics,
				test = Vehicles.UninstallTest.Default,
				complete = Vehicles.UninstallComplete.Door,
				requireUninstalled = SUB93BugGuard,
			}
			lua
			{
				create = Vehicles.Create.Default,
				init = Vehicles.Init.Door,
				update = Vehicles.Update.EngineDoor,
				use = Vehicles.Use.EngineDoor,
			}
		}
	}

	template vehicle SUB93BugGuard
	{
		part SUB93BugGuard
        {
            model bugGuard1635548
            {
                file = 93chevySuburbanBugGuard,
            }
                
            itemType = Base.93chevySuburbanBugGuards,
            area = Engine,
            parent = EngineDoor,
            category = bodywork,
            mechanicRequireKey = false,
            table install
            {
                items
                {
                    1
                    {
                        type = Base.Screwdriver,
                        count = 1,
                        keep = true,
                        equip = primary,
                    }
                }
                time = 310,
                skills = Mechanics:1,
                recipes = Intermediate Mechanics,
                test = Vehicles.InstallTest.Default,
                complete = SUB93.InstallComplete.BugGuard,
                requireInstalled = EngineDoor,
            }
            table uninstall
            {
                items
                {
                    1
                    {
                        type = Base.Screwdriver,
                        count = 1,
                        keep = true,
                        equip = primary,
                    }
                }
                    time = 700,
                    skills = Mechanics:1,
                    recipes = Intermediate Mechanics,
                    test = Vehicles.UninstallTest.Default,
                    complete = SUB93.UninstallComplete.BugGuard,
            }
            lua
            {
                create = SUB93.Create.BugGuard,
				init = SUB93.Init.BugGuard,
            }
        }
	}

	template vehicle SUB93BugGuardOff
	{
		template! = SUB93BugGuard,

		part SUB93BugGuard
        {
        	lua
            {
                create = DAMN.Create.Blank,
            }
        }
	}
}

