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

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

	TechRequired = experimentalElectrics
	entryCost = 63000

	node_attach = 0.0, 0.381, 0.0, 0.0, 1.0, 0.0, 0
	node_stack_top = 0.0, 0.381, 0.0, 0.0, 1.0, 0.0, 0
	node_stack_bottom = 0.0, -0.591, 0.0, 0.0, -1.0, 0.0, 0

	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 2.6
				pitch = 0.5 2.2
				pitch = 1.0 1.8
				loop = true
			}
			MODEL_MULTI_PARTICLE
			{
				modelName = NearFuturePropulsion/FX/vasimr-0625-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
				localOffset = 0, 0, 0.3
			}
		}
		run_vasimr_argon_glow
		{
			MODEL_MULTI_PARTICLE
			{
				modelName = NearFuturePropulsion/FX/vasimr-0625-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
				localOffset = 0, 0, 0.3
			}
		}
		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 2.6
				pitch = 0.5 2.2
				pitch = 1.0 1.8
				loop = true
			}
			MODEL_MULTI_PARTICLE
			{
				modelName = NearFuturePropulsion/FX/vasimr-0625-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
				localOffset = 0, 0, 0.3
			}
		}
		run_vasimr_xe_glow
		{
			MODEL_MULTI_PARTICLE
			{
				modelName = NearFuturePropulsion/FX/vasimr-0625-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
				localOffset = 0, 0, 0.3
			}
		}
	}

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

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

	// --- standard part parameters ---
	mass = 0.35
	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 = size0
	tags = #LOC_NFPropulsion_vasimr-0625_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 = 3.67
		heatProduction = 54.745547
		EngineType = Electric
		PROPELLANT
		{
			name = ArgonGas
			DrawGauge = True
			ratio = 1.0
		}
		PROPELLANT
		{
			name = ElectricCharge
			ratio = 2.860187
			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 = 6.22
		heatProduction = 48.452449
		EngineType = Electric
		PROPELLANT
		{
			name = XenonGas
			DrawGauge = True
			ratio = 1.0
		}
		PROPELLANT
		{
			name = ElectricCharge
			ratio = 63.064466
			DrawGauge = True
			minResToLeave = 1.0
		}
		atmosphereCurve
		{
			key = 0 4000
			key = 1 40
			key = 2 0.001
		}
	}

	MODULE
	{
		   name = ModuleJettison
		   jettisonName = Shroud
		   bottomNodeName = bottom
		   isFairing = True
		   jettisonedObjectMass = 0.1
		   jettisonForce = 0.5
		   jettisonDirection = 0 0 1
	}

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

		VARIABLEISPMODE
		{
			name = #LOC_NFPropulsion_Multimode_Argon_Short
			IspThrustCurve
			{
				key = 4500 4.85
				key = 6000 3.67
				key = 7500 2.50
			}
		}
		VARIABLEISPMODE
		{
			name = #LOC_NFPropulsion_Multimode_Xenon_Short
			IspThrustCurve
			{
				key = 3000 8.26
				key = 4000 6.22
				key = 5000 4.23
			}
		}
	}
	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 = 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 = 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
		}
	}
  MODULE
  {
    name = ModuleCargoPart
    packedVolume = 800
  } 
}
