// Near Future Propulsion 1.0.0
// VASIMR - 2.5m
PART
{
	// --- general parameters ---
	name = vasimr-25
	module = Part
	author = Chris Adderley (Nertea)

	// --- asset parameters ---
	MODEL {
		model = NearFuturePropulsion/Parts/Engines/vasimr-25/vasimr-25
	}
	scale = 1.0
	rescaleFactor = 1

	TechRequired = experimentalElectrics
	entryCost = 205000

	node_attach = 0.0, 1.363, 0.0, 0.0, 1.0, 0.0, 2
	node_stack_top = 0.0, 1.363, 0.0, 0.0, 1.0, 0.0, 2
	node_stack_bottom = 0.0, -1.679, 0.0, 0.0, -1.0, 0.0, 2

	EFFECTS
	{
		engage
		{
			AUDIO
			{
				channel = Ship
				clip = NearFuturePropulsion/Sounds/VASIMROn
				volume = 1.0
				pitch = 1.0
				loop = false
			}
		}
		flameout
		{
			PREFAB_PARTICLE
			{
				prefabName = fx_exhaustSparks_flameout_2
				transformName = thrustTransform
				oneShot = true
			}
			AUDIO
			{
				channel = Ship
				clip = NearFuturePropulsion/Sounds/GenericFlameout
				volume = 1.0
				pitch = 1.0
				loop = false
			}
		}
		run_vasimr_argon_core
		{
			AUDIO
			{
				channel = Ship
				clip = NearFuturePropulsion/Sounds/VASIMRLoop01
				volume = 0.0 0.0
				volume = 0.01 0.1
				volume = 0.5 0.2
				volume = 1.0 0.4
				pitch = 0.0 1.8
				pitch = 0.5 1.4
				pitch = 1.0 1.0
				loop = true
			}
			MODEL_MULTI_PARTICLE
			{
				modelName = NearFuturePropulsion/FX/vasimr-25-ar-core
				transformName = ThrustCore
				emission = 0.0 0.0
				emission = 0.01 0.1
				emission = 0.075 0.25
				emission = 1.0 1.0
				speed = 0.0 0.35
				speed = 1.0 1.0
			}
		}
		run_vasimr_argon_glow
		{
			MODEL_MULTI_PARTICLE
			{
				modelName = NearFuturePropulsion/FX/vasimr-25-ar-glow
				transformName = ThrustPlume
				emission = 0.0 0.0
				emission = 0.01 0.1
				emission = 0.075 0.25
				emission = 1.0 1.0
				speed = 0.0 0.35
				speed = 1.0 1.0
			}
		}
		run_vasimr_xe_core
		{
			AUDIO
			{
				channel = Ship
				clip = NearFuturePropulsion/Sounds/VASIMRLoop01
				volume = 0.0 0.0
				volume = 0.01 0.1
				volume = 0.5 0.2
				volume = 1.0 0.4
				pitch = 0.0 1.8
				pitch = 0.5 1.4
				pitch = 1.0 1.0
				loop = true
			}
			MODEL_MULTI_PARTICLE
			{
				modelName = NearFuturePropulsion/FX/vasimr-25-xe-core
				transformName = ThrustCore
				emission = 0.0 0.0
				emission = 0.01 0.1
				emission = 0.075 0.25
				emission = 1.0 1.0
				speed = 0.0 0.35
				speed = 1.0 1.0
			}
		}
		run_vasimr_xe_glow
		{
			MODEL_MULTI_PARTICLE
			{
				modelName = NearFuturePropulsion/FX/vasimr-25-xe-glow
				transformName = ThrustPlume
				emission = 0.0 0.0
				emission = 0.01 0.1
				emission = 0.075 0.25
				emission = 1.0 1.0
				speed = 0.0 0.35
				speed = 1.0 1.0
			}
		}
	}

	// --- editor parameters ---
	cost = 38800
	category = Propulsion
	subcategory = 0
	title = #LOC_NFPropulsion_vasimr-25_title
	manufacturer = #LOC_NFPropulsion_manufacturer_kerbkastria_title
	description = #LOC_NFPropulsion_vasimr-25_description

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

	// --- standard part parameters ---
	mass = 2.8
	dragModelType = default
	maximum_drag = 0.2
	minimum_drag = 0.3
	angularDrag = 2
	crashTolerance = 6
	breakingForce = 200
	breakingTorque = 200
	maxTemp = 1700
	emissiveConstant = 0.7
	skinInternalConductionMult = 4.0
	bulkheadProfiles = size2
	tags = #LOC_NFPropulsion_vasimr-25_tags
	MODULE
	{
		name = MultiModeEngine
		primaryEngineID = ArgonMode
		secondaryEngineID = XenonMode
		primaryEngineModeDisplayName = #LOC_NFPropulsion_Multimode_Argon
		secondaryEngineModeDisplayName = #LOC_NFPropulsion_Multimode_Xenon
	}
	
	MODULE
	{
		name = ModuleEnginesFX
		engineID = ArgonMode
		runningEffectName = run_vasimr_argon_core
		powerEffectName= run_vasimr_argon_glow
		thrustVectorTransformName = thrustTransform
		exhaustDamage = True
		ignitionThreshold = 0.1
		minThrust = 0
		maxThrust = 73.50
		heatProduction = 136.918876
		EngineType = Electric
		PROPELLANT
		{
			name = ArgonGas
			DrawGauge = True
			ratio = 1.0
		}
		PROPELLANT
		{
			name = ElectricCharge
			ratio = 2.856194
			DrawGauge = True
			minResToLeave = 1.0
		}
		atmosphereCurve
		{
			key = 0 6000
			key = 1 60
			key = 2 0.001
		}
	}

	MODULE
	{
		name = ModuleEnginesFX
		engineID = XenonMode
		runningEffectName = run_vasimr_xe_core
		powerEffectName= run_vasimr_xe_glow
		thrustVectorTransformName = thrustTransform
		exhaustDamage = True
		ignitionThreshold = 0.1
		minThrust = 0
		maxThrust = 124.45
		heatProduction = 121.296152
		EngineType = Electric
		PROPELLANT
		{
			name = XenonGas
			DrawGauge = True
			ratio = 1.0
		}
		PROPELLANT
		{
			name = ElectricCharge
			ratio = 63.036787
			DrawGauge = True
			minResToLeave = 1.0
		}
		atmosphereCurve
		{
			key = 0 4000
			key = 1 40
			key = 2 0.001
		}
	}

	MODULE
	{
		name = ModuleJettison
		jettisonName = Shroud_TopLeft
		bottomNodeName = bottom
		isFairing = False
		jettisonedObjectMass = 1
		jettisonForce = 0.01
		jettisonDirection = 0 -0.7 0.1
	}

	MODULE
	{
		name = ModuleJettison
		jettisonName = Shroud_TopRight
		bottomNodeName = bottom
		isFairing = False
		jettisonedObjectMass = 1
		jettisonForce = 0.01
		jettisonDirection = 0 -0.7 -0.1
	}

	MODULE
	{
		name = ModuleJettison
		jettisonName = Shroud_BottomLeft
		bottomNodeName = bottom
		isFairing = False
		jettisonedObjectMass = 1
		jettisonForce = 0.01
		jettisonDirection = 0 -0.7 0.1
	}

	MODULE
	{
		name = ModuleJettison
		jettisonName = Shroud_BottomRight
		bottomNodeName = bottom
		isFairing = False
		jettisonedObjectMass = 1
		jettisonForce = 0.01
		jettisonDirection = 0 -0.7 -0.1
	}

	MODULE
	{
		name = VariableISPEngine
		EnergyUsage = 1999.9
		UseDirectThrottle = false
		CurThrustSetting = 50

		VARIABLEISPMODE
		{
			name = #LOC_NFPropulsion_Multimode_Argon_Short
			IspThrustCurve
			{
				key = 3500 134.60
				key = 6000 73.50
				key = 8500 42.50
			}
		}
		VARIABLEISPMODE
		{
			name = #LOC_NFPropulsion_Multimode_Xenon_Short
			IspThrustCurve
			{
				key = 2000 279.00
				key = 4000 124.45
				key = 6000 66.80
			}
		}
	}
	MODULE
  {
    name = FXModuleThrottleEffects
    fxModuleNames = throttleColorXe
    responseSpeed = 1.0
    dependOnEngineState = True
    dependOnThrottle = True
    //engineName = XenonMode
    preferMultiMode = True
  }
  MODULE
  {
    name = FXModuleThrottleEffects
    fxModuleNames = heatColor
    responseSpeed = 1.0
    dependOnEngineState = True
    dependOnThrottle = True
    preferMultiMode = True
  }
  MODULE
  {
    name = ModuleColorChanger
    moduleID = throttleColorXe
    animRate = 1
    shaderProperty = _EmissiveColor
    includedRenderer = EngineGlow
    toggleInEditor = false
    toggleInFlight = false
    redCurve
    {
      key = 0 0.580392157
      key = 1 0.580392157
    }
    greenCurve
    {
      key = 0 0.698039216
      key = 1 0.698039216
    }
    blueCurve
    {
      key = 0 1
      key = 1 1
    }
    alphaCurve
    {
      key = 0 0
      key = 1 1
    }
  }
  
  
  MODULE
  {
    name = ModuleColorChanger
    moduleID = heatColor
    animRate = 0.025
    shaderProperty = _EmissiveColor
    excludedRenderer = EngineGlow
    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 = ModuleGimbal
		gimbalTransformName = thrustTransform
		gimbalRange = 2
	}
	MODULE
  {
    name = FXModuleThrottleEffects
    fxModuleNames = throttleColorXe
    responseSpeed = 1.0
    dependOnEngineState = True
    dependOnThrottle = True
    //engineName = XenonMode
    preferMultiMode = True
  }
  MODULE
  {
    name = ModuleColorChanger
    moduleID = throttleColorXe
    animRate = 1
    shaderProperty = _EmissiveColor
    includedRenderer = EngineGlow
    toggleInEditor = false
    toggleInFlight = false
    redCurve
    {
      key = 0 0.580392157
      key = 1 0.580392157
    }
    greenCurve
    {
      key = 0 0.698039216
      key = 1 0.698039216
    }
    blueCurve
    {
      key = 0 1
      key = 1 1
    }
    alphaCurve
    {
      key = 0 0
      key = 1 1
    }
  }
  
  MODULE
  {
    name = FXModuleThrottleEffects
    fxModuleNames = heatColor
    responseSpeed = 1.0
    dependOnEngineState = True
    dependOnThrottle = True
    preferMultiMode = True
  }
  MODULE
  {
    name = ModuleColorChanger
    moduleID = heatColor
    animRate = 0.025
    shaderProperty = _EmissiveColor
    excludedRenderer = EngineGlow
    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 = ModuleTestSubject
		useStaging = True
		useEvent = True
		situationMask = 112
		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 = LT
			value = 300000
			situationMask = 16
			body = _NotSun
		}
		CONSTRAINT
		{
			type = ALTITUDE
			test = LT
			value = 600000
			situationMask = 32
			body = _NotSun
		}
	}
}
