PART
{
	// --- general parameters ---
	name = tbmProp
	module = Part
	author = blackheart612

	// --- asset parameters ---
	mesh = model.mu
	rescaleFactor = 1

	// --- node definitions ---
	node_stack_top = 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0

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

	// --- FX definitions ---
	//fx_exhaustLight_yellow = 0.0, -0.1, 0.0, 0.0, 0.0, 1.0, power
	//fx_smokeTrail_light  = 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, power
	//fx_exhaustSparks_flameout = 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, flameout

	// --- Sound FX definition ---
	//sound_fspropstart.wav = engage
	//sound_fspropidle.wav = power
	//sound_jet_deep = running
	//sound_vent_soft = disengage
	//sound_explosion_low = flameout

	// --- editor parameters ---
	TechRequired = aerodynamicSystems
	cost = 1400
	entryCost = 3000
	category = Engine
	subcategory = 0
	title = #loc_APP_part_tbmProp_title
	manufacturer = #loc_APP_part_manufacturer
	description = #loc_APP_part_tbmProp_description
	bulkheadProfiles = size0
	tags = piper prop tbm-900 tucano turbo

	// --- standard part parameters ---
	mass = 0.15
	dragModelType = default
	maximum_drag = 0.2
	minimum_drag = 0.2
	angularDrag = 2
	breakingForce = 200
	breakingTorque = 200
	crashTolerance = 15
	maxTemp = 3600
	fuelCrossFeed = True

	MODULE
	{
		name = FSengineSounds
		engage = AirplanePlus/Sounds/tbm_startup
		//running =
		power = AirplanePlus/Sounds/tbm_idle
		disengage = AirplanePlus/Sounds/tbm_stop
		flameout = AirplanePlus/Sounds/tbm_stop
		//warning =
		powerPitchBase = 0.75
		thrustAddedToPitch = 0.25
		powerFadeInSpeed = 0.0025
		powerFadeInDelay = 0.4
		powerLowerThreshold = 0.0
		powerVolume = 1.0
		engageVolume = 1.0
		warningSoundThreshold = 0.8
		warningCooldownTime = 2.0
		randomStartDelay = 1.0 //for playing engines slightly out of sync
	}
	MODULE
	{
		name = ModuleEnginesFX
		thrustVectorTransformName = thrustTransform
		exhaustDamage = False
		ignitionThreshold = 0.1
		minThrust = 0
		maxThrust = 65
		heatProduction = 50
		useEngineResponseTime = True
		engineAccelerationSpeed = 0.3
		engineDecelerationSpeed = 0.4
		useVelocityCurve = True
		PROPELLANT
		{
			name = LiquidFuel
			ratio = 1
			DrawGauge = True
		}
		PROPELLANT
		{
			name = IntakeAir
			ignoreForIsp = True
			ratio = 15
		}
		atmosphereCurve
			{
				key = 0 8500 0 0
			}
			atmChangeFlow = True
			useVelCurve = True
			useAtmCurve = True
			flameoutBar = 0.01
			machLimit = 1.0
		velCurve
		{
			key = 0 0.2 1.89316 0.003767621
			key = 0.3168801 1 -0.05841255 -0.8771013
			key = 0.4609209 0.6403973 -6.142099 -4.819654
			key = 0.48 0.4210696 -10.46806 -97.10328
			key = 0.5 0.1 -16.1754 0
			key = 0.8 0.1 0 -1
			key = 0.9 0
		}
		atmCurve
		{
			key = 0 0
			key = 0.25 0.03140791 0.3664213 1.500368
			key = 0.3540252 0.4518901 2.387429 2.415682
			key = 1 1 2.341458 0
		}
	}
	MODULE
	{
		name = ModuleAlternator
		RESOURCE
		{
			name = ElectricCharge
			rate = 1.0
		}
	}

	//---- Integrated air intake (based on Kethane engine)

	MODULE
	{
		name = ModuleResourceIntake
		resourceName = IntakeAir
		checkForOxygen = false
		area = 0.03
		intakeSpeed = 50
		intakeTransformName = thrustTransform //Intake
	}
	RESOURCE
	{
		name = IntakeAir
		amount = 0
		maxAmount = 15.0
	}

	//---- Deployable air scoop responding to the throttle

	MODULE
	{
		name = FSplanePropellerSpinner
		propellerName = nosecone1
		rotationSpeed = 400
		windmillRPM = 0.1
		spinUpTime = 2.0
		useRotorDiscSwap = 1
		rotorDiscFadeInStart = 0.55
		rotorDiscFadeInEnd = 0.95
		rotorDiscSpeed = 30
		rotorDiscName = disc
		blade1 = nblade1
		blade2 = nblade2
		blade3 = nblade3
		blade4 = nblade4
		blade5 = nblade5
	}
	MODULE
	{
		name = FSplanePropellerSpinner
		propellerName = nosecone2
		rotationSpeed = 400
		windmillRPM = 0.1
		spinUpTime = 2.0
		useRotorDiscSwap = 1
		rotorDiscFadeInStart = 0.55
		rotorDiscFadeInEnd = 0.95
		rotorDiscSpeed = 30
		rotorDiscName = disc
		blade1 = rblade1
		blade2 = rblade2
		blade3 = rblade3
		blade4 = rblade4
		blade5 = rblade5
	}
	MODULE
	{
		name = FSswitchEngineThrustTransform
		defaultTTName = thrustTransform
		alternateTTName = alternatethrustTransform
		useNamedAlternate = 0
	}
	MODULE
	{
		name = FSengineHandCrank
	}
	MODULE
	{
		name = FSmeshSwitch
		moduleID = 0
		buttonName = Next
		previousButtonName = Previous
		objectDisplayNames = TBM;Avanti
		objects = body1, nosecone1, nblade1, nblade2, nblade3, nblade4, nblade5, collider1;body2, nosecone2, rblade1, rblade2, rblade3, rblade4, rblade5, collider2
		updateSymmetry = true
	}
}
