PART
{
	name = SaturnAL31
	module = Part
	author = Model: Porkjet; Config: TheKurgan; Texture: Porkjet, modified by Stardust
	MODEL
	{
		model = Squad/Parts/Engine/jetEngines/turboJet
        texture = Jet Engines, BDArmory/Parts/SaturnAL31/Jet_Engine_Saturn
	}
	rescaleFactor = 1
	node_stack_top = 0.0, 0.0, 0.0, 0.0, 1.0, 0.0
	CoMOffset = 0.0, 1.2, 0.0
	TechRequired = supersonicFlight
	entryCost = 7500
	cost = 3000
	category = Engine
	subcategory = 0
	bulkheadProfiles = size1
	title = #loc_BDArmory_part_SaturnAL31_title //Saturn AL-31FM1 Afterburning Jet Engine
	manufacturer = #loc_BDArmory_agent_title //Bahamuto Dynamics//KTech
	description = #loc_BDArmory_part_SaturnAL31_description //A high performance jet engine with a variable geometry thrust vectoring nozzle and an afterburner for extra thrust.  Based on the highly popular J-404 engine, KTech engineers saw the potential of (highly) modifying the commercial variant into a formidable powerplant for military use.  After seeing the potential of the engine, the BDAc group immediately licensed it for their new MkIII test drone.
	attachRules = 1,0,1,0,0
	tags = #loc_BDArmory_part_SaturnAL31_tags 
	mass = 1.05
	skinInternalConductionMult = 4.0
	emissiveConstant = 0.8 // engine nozzles are good at radiating.
	dragModelType = default
	maximum_drag = 0.2
	minimum_drag = 0.2
	angularDrag = 2
	crashTolerance = 7
	maxTemp = 2600
	MODULE
	{
		name = MultiModeEngine
		primaryEngineID = Dry
		secondaryEngineID = Wet
		carryOverThrottle = True
		autoSwitchAvailable = False
		primaryEngineModeDisplayName = Dry
		secondaryEngineModeDisplayName = Wet
	}

	MODULE
	{
		name = ModuleEnginesFX
		engineID = Dry
		thrustVectorTransformName = thrustTransform
		exhaustDamage = True
		ignitionThreshold = 0.1
		minThrust = 0
		maxThrust = 92
		heatProduction = 15
		useEngineResponseTime = True
		engineAccelerationSpeed = 0.5
		engineDecelerationSpeed = 0.5
		useVelocityCurve = False
		flameoutEffectName = flameout
		powerEffectName = power_dry
		//runningEffectName = running_thrust
		engageEffectName = engage
		disengageEffectName = disengage
		spoolEffectName = running_dry
		engineSpoolIdle = 0.05
		engineSpoolTime = 2.0
		EngineType = Turbine
		exhaustDamageMultiplier = 5
		PROPELLANT
		{
			name = LiquidFuel
			resourceFlowMode = STAGE_STACK_FLOW_BALANCE
			ratio = 1
			DrawGauge = True
		}
		PROPELLANT
		{
			name = IntakeAir
			ignoreForIsp = True
			ratio = 40
		}
		atmosphereCurve
		{
			key = 0 9600 0 0
		}
		// Jet params
		atmChangeFlow = True
		useVelCurve = True
		useAtmCurve = True
		flowMultCap = 1.1
		machLimit = 1.75
		machHeatMult = 20.0
		velCurve
		{
			key = 0 1 -0.1543096 -0.1543096
			key = 0.61 0.79 0 0
			key = 1.5 0.964 0 0
			key = 2 0.31 -3.278422 -3.278422
			key = 2.1 0 -0.9205825 -0.9205825
		}
		atmCurve
		{
			key = 0 0 -0.009380879 0.02675156
			key = 0.1475 0 0 0
			key = 0.21 0.75 10.11998 9.912155
			key = 0.2653 1 2.007882 1.716759
			key = 1.013 1 0.0005999365 -0.0007497668
		}
	}
	MODULE
	{
		name = ModuleEnginesFX
		engineID = Wet
		thrustVectorTransformName = thrustTransform
		exhaustDamage = True
		ignitionThreshold = 0.1
		minThrust = 0
		maxThrust = 152
		heatProduction = 75
		useEngineResponseTime = True
		engineAccelerationSpeed = 0.8
		engineDecelerationSpeed = 0.8
		useVelocityCurve = False
		flameoutEffectName = flameout
		//powerEffectName = running_wet
		runningEffectName = power_wet
		engageEffectName = engage
		disengageEffectName = disengage
		spoolEffectName = running_wet
		engineSpoolIdle = 0.05
		engineSpoolTime = 2.0
		EngineType = Turbine
		exhaustDamageMultiplier = 20
		PROPELLANT
		{
			name = LiquidFuel
			resourceFlowMode = STAGE_STACK_FLOW_BALANCE
			ratio = 1
			DrawGauge = True
		}
		PROPELLANT
		{
			name = IntakeAir
			ignoreForIsp = True
			ratio = 12
		}
		atmosphereCurve
		{
			key = 0 5200 0 0
		}
		// Jet params
		atmChangeFlow = True
		useVelCurve = True
		useAtmCurve = True
		flowMultCap = 1.1
		machLimit = 2.5
		machHeatMult = 20.0

		velCurve
		{	
			key = 0 1.25 0 0
			key = 0.25 1.7 2 2
			key = 1.8 2.8 0 0
			key = 2.5 2.25 -1.75 -1.75
			key = 4 0 0 0
		}

		atmCurve
		{
			key = 0 0 -0.009380879 0.02675156
			key = 0.1475 0 0 0
			key = 0.21 0.75 10.11998 9.912155
			key = 0.2653 1 2.007882 1.716759
			key = 1.013 1 0.0005999365 -0.0007497668
		}
	}

	MODULE
	{
		name = FXModuleAnimateThrottle
		animationName = TurboJetNozzleDry
		responseSpeed = 0.05
		layer = 1
		dependOnEngineState = True
		dependOnThrottle = True
		engineName = Dry
		weightOnOperational = True
	}
	MODULE
	{
		name = FXModuleAnimateThrottle
		animationName = TurboJetNozzleWet
		responseSpeed = 0.08
		layer = 2
		dependOnEngineState = True
		dependOnThrottle = True
		engineName = Wet
		weightOnOperational = True
	}
	MODULE
	{
		name = FXModuleAnimateThrottle
		animationName = TurboJetHeat
		responseSpeed = 0.0005
		layer = 3
		dependOnEngineState = True
		engineName = Wet
	}
	MODULE
	{
		name = ModuleGimbal
		gimbalTransformName = Gimbal
		gimbalRange = 10
 		gimbalResponseSpeed = 9
 		useGimbalResponseSpeed = true
	}

	MODULE
	{
		name = FXModuleConstrainPosition
		matchRotation = false
		matchPosition = true
		CONSTRAINFX
		{
			targetName = NozzlePoint
			moversName = Nozzle
		}
	}

	MODULE
	{
		name = ModuleAlternator
		engineName = Wet
		outputName = Alternator (Wet)
		RESOURCE
		{
			name = ElectricCharge
			rate = 5.0
		}
	}
	MODULE
	{
		name = ModuleAlternator
		engineName = Dry
		outputName = Alternator (Dry)
		RESOURCE
		{
			name = ElectricCharge
			rate = 3.0
		}
	}
	MODULE
	{
		name = ModuleSurfaceFX
		thrustProviderModuleIndex = 1
		fxMax = 0.6
		maxDistance = 25
		falloff = 2
		thrustTransformName = thrustTransform
	}
	MODULE
	{
		name = ModuleSurfaceFX
		thrustProviderModuleIndex = 2
		fxMax = 0.6
		maxDistance = 25
		falloff = 2
		thrustTransformName = thrustTransform
	}
	EFFECTS
	{

		running_dry
		{
			PREFAB_PARTICLE
			{
				prefabName = fx_smokeTrail_light
				transformName = smokePoint
				emission = 0.0 0.0
				emission = 0.05 0.0
				emission = 0.075 0.25
				emission = 1.0 1.25
				speed = 0.0 0.25
				speed = 1.0 1.0
				localOffset = 0, 0, 1
				localRotation = 1, 0, 0, -90
			}
			AUDIO
			{
				channel = Ship
				clip = sound_jet_low
				volume = 0.0 0.0
				volume = 0.05 0.9
				volume = 1.0 1.0
				pitch = 0.0 0.5
				pitch = 0.05 0.6
				pitch = 0.33 1.0
				pitch = 1.0 1.2
				loop = true
			}
		}

		power_dry
		{
			AUDIO
			{
				channel = Ship
				clip = sound_jet_deep
				volume = 0.0 0.0
				volume = 0.05 0.4
				volume = 1.0 0.9
				pitch = 0.0 0.8
				pitch = 1.0 1.4
				loop = true
			}
		}
		running_wet
		{
			PREFAB_PARTICLE
			{
				prefabName = fx_smokeTrail_light
				transformName = smokePoint
				emission = 0.0 0.0
				emission = 0.05 0.0
				emission = 0.075 0.5
				emission = 1.0 1.25
				speed = 0.0 0.25
				speed = 1.0 1.0
				localOffset = 0, 0, 1
				localRotation = 1, 0, 0, -90
			}
			AUDIO
			{
				channel = Ship
				clip = sound_jet_low
				volume = 0.0 0.0
				volume = 0.05 0.9
				volume = 1.0 1.0
				pitch = 0.0 0.5
				pitch = 0.05 0.6
				pitch = 0.33 1.0
				pitch = 1.0 1.2
				loop = true
			}
		}
		power_wet
		{

			AUDIO
			{
				channel = Ship
				clip = sound_rocket_spurts
				volume = 0.0 0.0
				volume = 0.1 0.3
				volume = 1.0 0.5
				pitch = 0.0 0.5
				pitch = 0.33 0.8
				pitch = 1.0 1.5
				loop = true
			}
			MODEL_MULTI_PARTICLE
			{
				modelName = Squad/FX/afterburner_flame
				transformName = smokePoint
				emission = 0.0 0.0
				emission = 0.05 0.05
				emission = 0.33 0.1
				emission = 1.0 1.0
				speed = 0.0 0.0
				speed = 0.05 0.05
				speed = 0.33 0.16
				speed = 1.0 1.0
				energy = 0.0 1.5
				energy = 0.33 1.0
				energy = 1.0 1.0
			}
		}
		engage
		{
			AUDIO
			{
				channel = Ship
				clip = sound_vent_medium
				volume = 1.0
				pitch = 2.0
				loop = false
			}
		}
		disengage
		{
			AUDIO
			{
				channel = Ship
				clip = sound_vent_soft
				volume = 1.0
				pitch = 2.0
				loop = false
			}
		}
		flameout
		{
			PREFAB_PARTICLE
			{
				prefabName = fx_exhaustSparks_flameout_2
				transformName = smokePoint
				oneShot = true
			}
			AUDIO
			{
				channel = Ship
				clip = sound_explosion_low
				volume = 1.0
				pitch = 2.0
				loop = false
			}
		}
	}
}
