
PART
{
// --- general parameters ---
name = SWJ2X
module = Part
author = TheShadow1138

// --- asset parameters ---
MODEL
{
  model = ShadowWorks/Parts/Engines/J2X
}
rescaleFactor = 1.0


// --- node definitions ---
node_stack_top = 0.0, 0.001, 0.0, 0.0, 1.0, 0.0, 2
//node_stack_bottom = 0.0, -2.764, 0.0, 0.0, -1.0, 0.0, 2


// --- FX definitions ---

fx_exhaustFlame_blue = 0.0, -4.989, 0.0, 0.0, 1.0, 0.0, running
fx_exhaustLight_blue = 0.0, -5.053, 0.0, 0.0, 0.0, 1.0, running
fx_exhaustSparks_flameout = 0.0, -5.053, 0.0, 0.0, 0.0, 1.0, flameout
fx_smokeTrail_light = 0.0, -5.053, 0.0, 0.0, 1.0, 0.0, running


// --- Sound FX definition ---

sound_vent_medium = engage
sound_rocket_hard = running
sound_vent_soft = deactivate
sound_explosion_low = flameout

// --- editor parameters ---
TechRequired = heavierRocketry
entryCost = 8800
cost = 3500
category = Propulsion
subcategory = 0
title = J-2X Engine SW-LE-J2-X
manufacturer = ShadowWorks
description = An upgraded version of an older engine design using improved manufacturing techniques in the 1.25m size class.  Built for use on the Apophis I and II launchers, but could also be used with the Kerbin Departure Stage, or the Amun-Ra Exploration Upper Stage.

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

// --- standard part parameters ---
mass = 2.89
dragModelType = default
maximum_drag = 0.2
minimum_drag = 0.2
angularDrag = 2
crashTolerance = 18
breakingForce = 120
breakingTorque = 120
maxTemp = 2200
bulkheadProfiles = size1

stagingIcon = LIQUID_ENGINE
 stageOffset = 1
childStageOffset = 1
tags = j2 j2x kerbin departure stage ares apophis sls eds kds amun ra amun-ra shadowworks

MODULE
{
	name = ModuleEngines
	engineID = SWJ2XEng
	thrustVectorTransformName = thrustTransform
	exhaustDamage = True
	ignitionThreshold = 0.1
	minThrust = 0
	maxThrust = 877
	heatProduction = 125
	fxOffset = 0, 0, 1.75
	PROPELLANT
	{
		name = LiquidFuel
       	        ratio = 0.9
		DrawGauge = True
	}
	PROPELLANT
	{
		name = Oxidizer
		ratio = 1.1
	}
	atmosphereCurve
 	{
   	 key = 0 390		// Original Value with maxThrust = 350 => 320
  	 key = 1 180		// Original Value with maxThrust = 350 => 232
 	}
	
}

MODULE
{
	name = ModuleGimbal
	gimbalTransformName = thrustTransform
	gimbalRange = 5.0
}



MODULE
{
	name = FXModuleAnimateThrottle
	animationName = emissiveAnim
	responseSpeed = 0.00025
	dependOnEngineState = True
	dependOnThrottle = True
}

MODULE
{
	name = ModuleAlternator	
	RESOURCE
	{
		name = ElectricCharge
		rate = 3
	}
}

	MODULE
	{
		name = ModuleSurfaceFX
		thrustProviderModuleIndex = 0
		fxMax = 0.75
		maxDistance = 65
		falloff = 2
		thrustTransformName = thrustTransform
	}

	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 = 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
		}
	}
	
}





