PART
{
// Kerbal Space Program - Part Config


// --- general parameters ---
name = SYlandingLeg2
module = Part
author = NecroBones

// --- asset parameters ---

MODEL
{
	model = SpaceY-Lifters/Parts/LandingLegs/SYlandingLeg2
	scale = 1.0, 1.0, 1.0
}
scale = 1.0
rescaleFactor = 1.0


// --- node definitions ---
node_attach = 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 3

// --- editor parameters ---
TechRequired = heavyLanding
entryCost = 2400
cost = 600
category = Ground
subcategory = 0
title = SpaceY Stage-Recovery Landing Leg
manufacturer = SpaceY Technologies Corporation
description = A very large landing leg intended for recovery of heavy booster sections. 

// attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision
attachRules = 0,1,0,0,1

// --- standard part parameters ---
mass = 0.2
dragModelType = default
maximum_drag = 0.2
minimum_drag = 0.2
angularDrag = 2
crashTolerance = 20
maxTemp = 2500
bulkheadProfiles = srf

breakingForce = 50000
breakingTorque = 50000

explosionPotential = 0


	tags = spacey ground land leg support

	MODULE
	{
		name = ModuleWheelBase
		
		wheelColliderTransformName = wheelCollider

		wheelType = LEG		
		
		// setting this to true will override the radius and center parameters
		FitWheelColliderToMesh = False		
		radius = 0.15
		center = 0,0,0
		mass = 0.04
		autoFrictionAvailable = False
		clipObject = pistonCollider
				
		TooltipTitle = Landing Leg
		TooltipPrimaryField = 
		
		groundHeightOffset = 1.0
	}
	MODULE
	{
		name = ModuleWheelSuspension
		baseModuleIndex = 0
		suspensionTransformName = SYlandingLeg2piston
		suspensionColliderName = pistonCollider

		suspensionDistance = 0.77	// 0.8x 0.95
		suspensionOffset = -0.77
		
		targetPosition = 1			
		springRatio = 8
		damperRatio = 25
		boostRatio = 0.1
	}
	MODULE
	{
		name = ModuleWheelDeployment
		baseModuleIndex = 0
		
		animationTrfName = SYlandingLeg2
		animationStateName = deploy
		deployedPosition = 1
		deployTargetTransformName = deployTgt
		retractTransformName = SYlandingLeg2piston

		TsubSys = 0.8

		//extendDurationFactor = 1.0
		//retractDuractionFactor = 1.0

		fxDeploy = deploy
		fxRetract = retract
		fxDeployed = deployed
		fxRetracted = retracted
	}
	MODULE
	{
		name = ModuleWheelLock
		maxTorque = 5000
	}
	MODULE
	{
		name = ModuleWheelBogey
		baseModuleIndex = 0
		
		bogeyTransformName = SYlandingLeg2foot
		deployModuleIndex = 2
		
		maxPitch = 0
		minPitch = 0
		restPitch = 0
		pitchResponse = 100
		
		bogeyAxis = 0, 1, 0
		bogeyUpAxis = 0, 0, -1
	}
	MODULE
	{
		name = ModuleWheelDamage
		baseModuleIndex = 0
		
		stressTolerance = 99999999
		impactTolerance = 5000
		deflectionMagnitude = 1
		deflectionSharpness = 2.0
		slipMagnitude = 0
		slipSharpness = 2.0
		explodeMultiplier = 1.0
	}

//MODULE
//{
//	name = ModuleLandingLeg
//
//	animationName = deploy
//	wheelColliderName = wheelCollider
//	suspensionTransformName = SYlandingLeg2piston
//	suspensionUpperLimit = 0.8
//	impactTolerance = 8000
//	suspensionSpring = 15
//	suspensionDamper = 5
//
//	orientFootToGround = false
//	landingFootName = SYlandingLeg2foot
//	// Axis is aligned forward instead of up
//	alignFootUp = false
//}


	EFFECTS
	{
		deploy
		{
			AUDIO
			{
				channel = Ship
				clip = Squad/Sounds/elev_start
				volume = 0 0
				volume = 1 0.5
				pitch = 0.5
			}
			AUDIO_LOOP
			{
				channel = Ship
				clip = Squad/Sounds/elev_loop
				volume = 0 0
				volume = 1 0.5
				pitch = 0.5
			}
		}
		deployed
		{
			AUDIO
			{
				channel = Ship
				clip = Squad/Sounds/elev_stop
				volume = 0 0
				volume = 1 0.5
				pitch = 0.5
			}
		}
		retract
		{
			AUDIO
			{
				channel = Ship
				clip = Squad/Sounds/elev_start
				volume = 0 0
				volume = 1 0.5
				pitch = 0.5
			}
			AUDIO_LOOP
			{
				channel = Ship
				clip = Squad/Sounds/elev_loop
				volume = 0 0
				volume = 1 0.5
				pitch = 0.6
			}
		}
		retracted
		{
			AUDIO
			{
				channel = Ship
				clip = Squad/Sounds/elev_stop
				volume = 0 0
				volume = 1 0.5
				pitch = 0.75
			}
		}
	}


}
