module Base
{
	
	model 87toyotaMR2spoiler0
	{
		mesh = vehicles/Vehicles_87toyotaMR2_Body|mr2_spoiler0,
		shader = damn_vehicle_shader,
        static = FALSE,
		scale = 0.1,
	}

    model 87toyotaMR2spoiler1
    {
        mesh = vehicles/Vehicles_87toyotaMR2_Body|mr2_spoiler1,
        shader = damn_vehicle_shader,
        scale = 0.1,
    }

	template vehicle MR2Spoilers
		{
		part DAMNSpoiler
       		{

            model MR2spoiler0
			{
                	file = 87toyotaMR2spoiler0,
			}

            category = bodywork,
            area = TruckBed,
            parent = TrunkDoor,
            door
            {
            }
            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.87toyotaMR2Spoiler,
            mechanicRequireKey = false,
            durability = 3,

            table install
            {
                items
                {
                    item
                    {
                        tags = Wrench,
                        count = 1,
                        keep = true,
                        equip = primary,
                    }
                }
                time = 1000,
                skills = Mechanics:4,
                recipes = Advanced Mechanics,
                requireInstalled = TrunkDoor,
                test = Vehicles.InstallTest.Default,
                complete = MR2.InstallComplete.Spoiler,
                requireInstalled = TrunkDoor,
                
            }
            table uninstall
            {
                items
                {
                    item
                    {
                        tags = Wrench,
                        count = 1,
                        keep = true,
                        equip = primary,
                    }
                }
                time = 1000,
                skills = Mechanics:4,
                recipes = Advanced Mechanics,
                test = Vehicles.UninstallTest.Default,
                complete = MR2.UninstallComplete.Spoiler,
            }
            lua
            {
                create = MR2.Create.Spoiler,
                init = MR2.Init.Spoiler,
            }
        }

        part DAMNSpoilerRoof
            {

            model MR2spoiler1
            {
                    file = 87toyotaMR2spoiler1,
            }

            category = bodywork,
            area = Engine,
            door
            {
            }
            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.87toyotaMR2RoofSpoiler,
            mechanicRequireKey = false,
            durability = 3,

            table install
            {
                items
                {
                    item
                    {
                        tags = Wrench,
                        count = 1,
                        keep = true,
                        equip = primary,
                    }
                }
                time = 1000,
                skills = Mechanics:4,
                recipes = Advanced Mechanics,
                test = Vehicles.InstallTest.Default,
                complete = MR2.InstallComplete.SpoilerRoof,
                
            }
            table uninstall
            {
                items
                {
                    item
                    {
                        tags = Wrench,
                        count = 1,
                        keep = true,
                        equip = primary,
                    }
                }
                time = 1000,
                skills = Mechanics:4,
                recipes = Advanced Mechanics,
                test = Vehicles.UninstallTest.Default,
                complete = MR2.UninstallComplete.SpoilerRoof,
            }
            lua
            {
                create = MR2.Create.SpoilerRoof,
                init = MR2.Init.SpoilerRoof,
            }
        }
	}
}

