// In very small part derived from the RD-100 model from RealEnginesPack by Alcentar, distributed under GNU General Public License, version 2
PART
{
	name = aa-1
	module = Part
	author = Charles Rogers

	MODEL
	{
		model = AlcoholicAeronautics/Assets/aa-1-engine
	}
	MODEL
	{
		model = AlcoholicAeronautics/Assets/aa-1-gimbal-unit
	}
	MODEL
	{
		model = AlcoholicAeronautics/Assets/aa-mount-125
		position = 0.0, 1.25, 0.0
	}
	SHABBY_MATERIAL_REPLACE:NEEDS[Resurfaced]
	{
		materialDef = aa-common-pbr
		targetMaterial = aa-common
	}
	SHABBY_MATERIAL_REPLACE:NEEDS[Resurfaced]
	{
		materialDef = aa-1-engine-pbr
		targetMaterial = aa-1-engine
	}
	rescaleFactor = 1
	scale = 1
	node_attach = 0.0, 1.25, 0.0, 0.0, 1.0, 0.0, 1
	node_stack_top = 0.0, 1.25, 0.0, 0.0, 1.0, 0.0, 1
	node_stack_bottom = 0.0, -1.25, 0.0, 0.0, -1.0, 0.0, 1

	TechRequired = start
	entryCost = 900
	cost = 200
	category = Engine
	subcategory = 0
	title = #LOC_AlcoholicAeronautics_aa-1_title
	manufacturer = #LOC_AlcoholicAeronautics_manufacturer_title
	description = #LOC_AlcoholicAeronautics_aa-1_description
	attachRules = 1,1,1,1,0
	mass = 0.75
	dragModelType = default
	maximum_drag = 0.2
	minimum_drag = 0.2
	angularDrag = 5
	crashTolerance = 24
	breakingForce = 150
	breakingTorque = 150
	maxTemp = 2000
	stagingIcon = LIQUID_ENGINE
	stageOffset = 1
	childStageOffset = 1
	bulkheadProfiles = size1, srf
	stackSymmetry = 3
	tags = #LOC_AlcoholicAeronautics_aa-1_tags

	EFFECTS
	{
		aa-1-running
		{
			AUDIO
			{
				channel = Ship
				clip = sound_rocket_hard
				volume = 0.0 0.0
				volume = 0.01 0.4
				volume = 1.0 1.0
				pitch = 0.0 0.2
				pitch = 0.01 0.6
				pitch = 1.0 1.8
				loop = true
			}
			MODEL_MULTI_PARTICLE
			{
				name = core
				modelName = AlcoholicAeronautics/FX/PlumeParty/Engines/Turbine/subCandle
				transformName = mainFX
				emission = 0.0 0.0
				emission = 0.3 0.15
				emission = 1.0 1.0
				speed = 0.0 2.0
				speed = 1.0 2.0
				energy = 0.2 0.4
				energy = 1.0 1.0
			}
			MODEL_MULTI_PARTICLE
			{
				name = stream
				modelName = AlcoholicAeronautics/FX/PlumeParty/Engines/BlueOrigin/keroSLLamp
				transformName = mainFX
				emission = 0.0 0.0
				emission = 0.3 0.02
				emission = 1.0 0.1
				speed = 0.0 1.0
				speed = 1.0 1.3
				energy = 0.2 0.4
				energy = 1.0 1.0
				localScale = 0.7,0.7,0.7
				localPosition = 0.0,0.0,-0.2
			}
			// MODEL_MULTI_PARTICLE
			// {
			// 	name = smoke
			// 	modelName = AlcoholicAeronautics/FX/PlumeParty/Engines/Smoke/smokeWhiteM
			// 	transformName = exhaustTransform
			// 	emission = 0.0 0.0
			// 	emission = 0.3 0.15
			// 	emission = 1.0 1.0
			// 	speed = 0.0 1.0
			// 	speed = 1.0 1.3
			// 	energy = 0.2 0.4
			// 	energy = 1.0 1.4
			// 	localScale = 0.1,0.1,0.1
			// }
			MODEL_MULTI_PARTICLE
			{
				name = vernier
				modelName = AlcoholicAeronautics/FX/PlumeParty/Engines/Turbine/turboYellowShock
				transformName = vernierFX
				emission = 0.0 0.0
				emission = 0.3 0.15
				emission = 1.0 1.0
				speed = 0.0 0.5
				speed = 1.0 1.0
				energy = 0.2 0.2
				energy = 1.0 0.5
				localPosition = 0.0,0.0,0.1
			}
		}
		engage
		{
			AUDIO
			{
				channel = Ship
				clip = sound_vent_soft
				volume = 1.0
				pitch = 2.0
				loop = false
			}
		}
		disengage
		{
			AUDIO
			{
				channel = Ship
				clip = sound_explosion_low
				volume = 1.0
				pitch = 2.0
				loop = false
			}
		}
		flameout
		{
			PREFAB_PARTICLE
			{
				prefabName = fx_exhaustSparks_flameout_2
				transformName = thrustTransform
				oneShot = true
				localScale = 1.0,1.0,1.0
			}
			AUDIO
			{
				channel = Ship
				clip = sound_explosion_low
				volume = 1.0
				pitch = 2.0
				loop = false
			}
		}
	}
	RESOURCE
	{
		name = MonoPropellant
		amount = 15
		maxAmount = 15
	}
	MODULE
	{
		name = ModuleEnginesFX
		thrustVectorTransformName = thrustTransform
		throttleLocked = True
		exhaustDamage = True
		ignitionThreshold = 0.1
		minThrust = 0
		maxThrust = 90
		heatProduction = 250
		EngineType = LiquidFuel
		runningEffectName = aa-1-running

		PROPELLANT
		{
			name = Ethanol
			ratio = 0.5
			DrawGauge = True
		}
		PROPELLANT
		{
			name = Oxidizer
			ratio = 0.1
		}
		PROPELLANT
		{
			name = MonoPropellant
			ratio = 0.0025
			ignoreForIsp = True
		}
		atmosphereCurve
		{
			key = 0 235
			key = 1 205
			key = 12 0.001
		}
	}
	MODULE
	{
		name = ModuleGimbal
		useGimbalResponseSpeed = true
		gimbalTransformName = vaneGimbal
		gimbalRangeXN = 0
		gimbalRangeXP = 0
		gimbalRangeYN = 0
		gimbalRangeYP = 0
	}
	MODULE
	{
		name = ModuleB9DisableTransform
		transform = aa-mount-125-points
		transform = aa-mount-125-tube-short
	}
	MODULE
	{
		name = ModuleB9PartSwitch
		moduleID = meshSwitchMount
		switcherDescription = Mount
		switcherDescriptionPlural = Mounts
		affectDragCubes = False
		affectFARVoxels = False
		SUBTYPE
		{
			name = 1.25m ring
			title = 1.25m ring
			transform = aa-mount-125-ring
		}
		SUBTYPE
		{
			name = 1.25m tube
			title = 1.25m tube
			transform = aa-mount-125-tube
		}
		SUBTYPE
		{
			name = Gimbal unit
			title = Gimbal unit
			transform = aa-1-gimbal-unit
			transform = aa-mount-125-tube
			transform = aa-1-gimbal-unit-ring
			transform = vaneGimbal
			addedCost = 150
			addedMass = 0.1
			NODE
			{
				name = bottom
				position = 0.0, -1.5, 0.0
			}
			MODULE
			{
				IDENTIFIER
				{
					name = ModuleGimbal
				}
				DATA
				{
					gimbalRangeXN = -10
					gimbalRangeXP = 10
				}
			}
		}
	}
	MODULE
	{
		name = ModuleB9PartSwitch
		moduleID = textureSwitch
		switcherDescription = Surface
		switcherDescriptionPlural = Surfaces		
		SUBTYPE
		{
			name = BlackAndWhite
			title = Black and white
			primaryColor = #ffffff
			secondaryColor = #000000
			TEXTURE
			{
				transform = aa-1-gimbal-unit
				transform = aa-mount-125-tube
				shaderProperty = _MainTex
				texture = AlcoholicAeronautics/Assets/aa-common-black-and-white-diff
			}
		}
		SUBTYPE
		{
			name = White
			title = White
			primaryColor = #ffffff
			secondaryColor = #ffffff
			TEXTURE
			{
				transform = aa-1-gimbal-unit
				transform = aa-mount-125-tube
				shaderProperty = _MainTex
				texture = AlcoholicAeronautics/Assets/aa-common-white-diff
			}
		}
		SUBTYPE
		{
			name = Gray and orange
			title = GrayAndOrange
			primaryColor = #4c4f47
			secondaryColor = #f49841
			TEXTURE
			{
				transform = aa-1-gimbal-unit
				transform = aa-mount-125-tube
				shaderProperty = _MainTex
				texture = AlcoholicAeronautics/Assets/aa-common-gray-and-orange-diff
			}
		}
	}
	MODULE
	{
		name = ModuleSurfaceFX
		thrustProviderModuleIndex = 0
		fxMax = 0.5
		maxDistance = 30
		falloff = 1.7
		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 = innerGlow
		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 = innerGlow
		toggleInEditor = false
		toggleInFlight = false
		redCurve
		{
			key = 0 1
			key = 1 1
		}
		greenCurve
		{
			key = 0 1
			key = 1 1
		}
		blueCurve
		{
			key = 0 1
			key = 1 1
		}
		alphaCurve
		{
			key = 0 0
			key = 1 1
		}
	}
}