PART
{
	name = benjee10_AJ10_v2
	module = Part
	author = Benjee10

	sound_explosion_low = flameout
	TechRequired = heavyRocketry
	entryCost = 4100
	cost = 1000
	category = Engine
	subcategory = 0
	title = KJ-10b "Viking" Orbital Manoeuvring Engine
	manufacturer = Olympus Spaceflight Emporium
	description = A no-nonsense service engine designed for... pretty much anything really. 
	attachRules = 1,0,1,0,0
	mass = 0.8
	heatConductivity = 0.06 // half default
	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
	breakingForce = 200
	breakingTorque = 200
	maxTemp = 2000 // = 3600
	bulkheadProfiles = size0
	tags = orbit, direct, upper, vacuum, shuttle, OV, OMS, service, orion

	MODEL
	{
		model = Benjee10_sharedAssets/Parts/Engines/AJ10_v2
	}
	scale = 1
	rescaleFactor = 1

	EFFECTS
	{
		running
		{
			AUDIO
			{
				channel = Ship
				clip = sound_rocket_mini
				volume = 0.0 0.0
				volume = 1.0 0.5
				pitch = 0.0 0.5
				pitch = 1.0 1.0
				loop = true
			}
			MODEL_MULTI_PARTICLE
			{
				modelName = Squad/FX/Monoprop_big
				transformName = thrustTransform
				emission = 0.0 0.0
				emission = 0.4 0.8
				emission = 1.0 1.0
				speed = 0.0 0.8
				speed = 1.0 1.0
				//localOffset = 0, 0, 1
				localPosition = 0, 0, 0
			}
		}	
		engage
		{
			AUDIO
			{
				channel = Ship
				clip = sound_vent_soft
				volume = 1.0
				pitch = 2.0
				loop = false
			}
		}
		flameout
		{
			PREFAB_PARTICLE
			{
				prefabName = fx_exhaustSparks_flameout_2
				transformName = thrustTransform
				oneShot = true
			}
			AUDIO
			{
				channel = Ship
				clip = sound_explosion_low
				volume = 1.0
				pitch = 2.0
				loop = false
			}
		}	
	}

	MODULE
	{
		name = ModuleEnginesFX
		thrustVectorTransformName = thrustTransform
		exhaustDamage = True
		ignitionThreshold = 0.1
		minThrust = 0
		maxThrust = 30
		heatProduction = 83
		fxOffset = 0, 0, 0
		EngineType = LiquidFuel
		exhaustDamageDistanceOffset = 1.75
		runningEffectName = running
		PROPELLANT
		{
			name = LiquidFuel
			ratio = 0.9
			DrawGauge = True
		}
		PROPELLANT
		{
			name = Oxidizer
			ratio = 1.1
		}
		atmosphereCurve
		{
			key = 0 316
			key = 1 27
			key = 3 0.001
		}
	}

	MODULE
	{
		name = ModuleGimbal
		gimbalTransformName = gimbal
		gimbalRange = 5
	}

	NODE
	{
		name = topNode
		transform = topNode
		size = 0
	}

	NODE
	{
		name = shieldNode1
		transform = shieldNode1
		size = 0
	}

	NODE
	{
		name = shieldNode2
		transform = shieldNode2
		size = 0
	}

	MODULE
	{
		name = ModuleB9PartSwitch
		moduleID = mount
		switcherDescription = Mount
		affectDragCubes = false
		SUBTYPE
		{
			name = bare
			title = bare
			primaryColor = grey
			secondaryColor = grey
			node = topNode
		}
		SUBTYPE
		{
			name = HS
			title = Heat Shield (0.9375m)
			primaryColor = black
			secondaryColor = grey
			transform = AJ10_shield
			node = shieldNode1
			node = shieldNode2
		}
	}


	MODULE
	{
		name = ModuleTestSubject
		useStaging = True
		useEvent = True
		situationMask = 127
		CONSTRAINT
		{
			type = REPEATABILITY
			value = ALWAYS
			prestige = Trivial
		}
		CONSTRAINT
		{
			type = REPEATABILITY
			value = BODYANDSITUATION
			prestige = Significant
		}
		CONSTRAINT
		{
			type = REPEATABILITY
			value = ONCEPERPART
			prestige = Exceptional
		}
		CONSTRAINT
		{
			type = ALTITUDEENV
			test = GT
			value = 4000
			prestige = Trivial
		}
		CONSTRAINT
		{
			type = ALTITUDEENV
			test = LT
			value = 8000
			prestige = Trivial
		}
		CONSTRAINT
		{
			type = ALTITUDEENV
			test = GT
			value = 2000
			prestige = Significant
		}
		CONSTRAINT
		{
			type = ALTITUDEENV
			test = LT
			value = 4000
			prestige = Significant
		}
		CONSTRAINT
		{
			type = ALTITUDEENV
			test = GT
			value = 1000
			prestige = Exceptional
		}
		CONSTRAINT
		{
			type = ALTITUDEENV
			test = LT
			value = 2000
			prestige = Exceptional
		}
		CONSTRAINT
		{
			type = ALTITUDE
			test = GT
			value = 0 // this just registers altitude as something to care about
			situationMask = 8
		}
		CONSTRAINT
		{
			type = ALTITUDE
			test = LT
			value = 300000
			situationMask = 16
			body = _NotSun
		}
		CONSTRAINT
		{
			type = ALTITUDE
			test = LT
			value = 600000
			situationMask = 32
			body = _NotSun
		}
		CONSTRAINT
		{
			type = SPEED
			test = GT
			value = 0
			situationMask = 8
			prestige = Trivial
		}
		CONSTRAINT
		{
			type = SPEED
			test = LT
			value = 600
			situationMask = 8
			prestige = Trivial
		}
		CONSTRAINT
		{
			type = SPEED
			test = GT
			value = 300
			situationMask = 8
			prestige = Significant
		}
		CONSTRAINT
		{
			type = SPEED
			test = LT
			value = 1200
			situationMask = 8
			prestige = Significant
		}
		CONSTRAINT
		{
			type = SPEED
			test = GT
			value = 600
			situationMask = 8
			prestige = Exceptional
		}
		CONSTRAINT
		{
			type = SPEED
			test = LT
			value = 2500
			situationMask = 8
			prestige = Exceptional
		}
		CONSTRAINT
		{
			type = SPEEDENV
			test = LT
			value = 200
			prestige = Trivial
		}
		CONSTRAINT
		{
			type = SPEEDENV
			test = GT
			value = 100
			prestige = Trivial
		}
		CONSTRAINT
		{
			type = SPEEDENV
			test = LT
			value = 100
			prestige = Significant
		}
		CONSTRAINT
		{
			type = SPEEDENV
			test = GT
			value = 50
			prestige = Significant
		}
		CONSTRAINT
		{
			type = SPEEDENV
			test = LT
			value = 50
			prestige = Exceptional
		}
		CONSTRAINT
		{
			type = SPEEDENV
			test = GT
			value = 20
			prestige = Exceptional
		}
	}

	MODULE
	{
		name = ModuleSurfaceFX
		thrustProviderModuleIndex = 0
		fxMax = 0.6
		maxDistance = 30
		falloff = 1.5
		thrustTransformName = thrustTransform
	}

	MODULE
	{
		name = FXModuleThrottleEffects
		fxModuleNames = heatColor
		responseSpeed = 1.0
		dependOnEngineState = True
		dependOnThrottle = True
	}
	
	MODULE
	{
		name = FXModuleThrottleEffects
		fxModuleNames = throttleColor
		responseSpeed = 1.0
		dependOnEngineState = True
		dependOnThrottle = True
	}

	MODULE
	{
		name = ModuleColorChanger
		moduleID = heatColor
		animRate = 0.025
		shaderProperty = _EmissiveColor
		excludedRenderer = AJ10_cone
		toggleInEditor = false
		toggleInFlight = false
		redCurve
		{
			key = 0 0 1 1
			key = 1 1 1 1
		}
		greenCurve
		{
			key = 0 0 1 1
			key = 1 1 1 1
		}
		blueCurve
		{
			key = 0 0 1 1
			key = 1 1 1 1
		}
		alphaCurve
		{
			key = 0 0 1 1
			key = 1 1 1 1
		}
		
	}

	MODULE
	{
		name = ModuleColorChanger
		moduleID = throttleColor
		animRate = 1
		shaderProperty = _TintColor
		includedRenderer = AJ10_cone
		toggleInEditor = false
		toggleInFlight = false
		redCurve
		{
			key = 0 0
			key = 1 1
		}
		greenCurve
		{
			key = 0 0
			key = 1 1
		}
		blueCurve
		{
			key = 0 0
			key = 1 1
		}
		alphaCurve
		{
			key = 0 0
			key = 1 1
		}
		
	}

	MODULE
	{
		name = ModuleCargoPart
		packedVolume = 350
	}
}
