PART
{
	name = RSBengineJ2T
	module = Part
	author = NecroBones

	// --- asset parameters ---
	MODEL
	{
		model = RealScaleBoosters/Parts/Engines/RSBengineJ2T
		scale = 1.0, 1.0, 1.0
	}
	scale = 1.0
	rescaleFactor = 1

	CoPOffset = 0.0, -1.0, 0.0
	CoMOffset = 0.0, -0.5, 0.0

	node_stack_top = 0.0, 0.2, 0.0, 0.0, 1.0, 0.0, 2
	//node_stack_bottom = 0.0, -2.77376, 0.0, 0.0, -1.0, 0.0, 2
	node_attach = 0.0, 0.2, 0.0, 0.0, 1.0, 0.0, 1

	TechRequired = veryHeavyRocketry
	entryCost = 275000
	cost = 45000
	category = Engine
	subcategory = 0
	title = J-2T Cryogenic Engine
	manufacturer = Real Scale Boosters
	description = Uprated version of the J-2. Manufactured by Rocketdyne.
	attachRules = 1,1,1,0,1

	tags = saturn ?ets ?rsb upper second propuls rocket sustain

	mass = 1.7881
	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 = 15
	breakingForce = 15000
	breakingTorque = 15000
	maxTemp = 2300 // = 3600
	bulkheadProfiles = size2, srf

	SMURFFExclude = true	// For the SMURFF mod, so it doesn't alter our engine mass.

	MODULE
	{
		name = ModuleEnginesFX
		engineID = RSBJ2
		runningEffectName = running_closed
		thrustVectorTransformName = thrustTransform
		exhaustDamage = True
		ignitionThreshold = 0.1
		minThrust = 0
		maxThrust = 1033.1
		heatProduction = 150
		fxOffset = 0, 0, 0.0
		//engineAccelerationSpeed = 0.4
		//engineDecelerationSpeed = 0.5
		EngineType = LiquidFuel
		PROPELLANT
		{
			name = LiquidFuel
			ratio = 0.9
			DrawGauge = True
		}
		PROPELLANT
		{
			name = Oxidizer
			ratio = 1.1
		}
		atmosphereCurve
		{
			key = 0 421
			key = 1 300
			key = 12 0.001
		}
	}

	EFFECTS
	{
		running_closed
		{
			AUDIO
			{
				channel = Ship
				clip = sound_rocket_hard
				volume = 0.0 0.0
				volume = 1.0 1.0
				pitch = 0.0 0.2
				pitch = 1.0 1.1
				loop = true
			}
			PREFAB_PARTICLE
			{
				prefabName = fx_smokeTrail_veryLarge
				transformName = smokeTransform
				emission = 0.0 0.0
				emission = 0.05 0.0
				emission = 0.075 0.25
				emission = 1.0 1.0
				speed = 0.0 0.25
				speed = 1.0 1.0
				localOffset = 0, 0, 1
			}
			MODEL_MULTI_PARTICLE
			{
				modelName = RealScaleBoosters/FX/RSBemitterJ2	// Squad/FX/ksX_Exhaust
				transformName = fxTransform
				emission = 0.0 0.0
				emission = 0.05 0.0
				emission = 0.075 0.25
				emission = 1.0 1.0
				speed = 0.0 0.5
				speed = 1.0 1.0
			}
		}
		engage
		{
			AUDIO
			{
				channel = Ship
				clip = sound_vent_soft
				volume = 1.0
				pitch = 1.7
				loop = false
			}
		}
		flameout
		{
			PREFAB_PARTICLE
			{
				prefabName = fx_exhaustSparks_flameout_2
				transformName = fxTransform
				oneShot = true
			}
			AUDIO
			{
				channel = Ship
				clip = sound_explosion_low
				volume = 1.0
				pitch = 1.7
				loop = false
			}
		}
	}
	MODULE
	{
		name = FXModuleAnimateThrottle
		animationName = RSBengineHeat
		responseSpeed = 0.001
		dependOnEngineState = True
		dependOnThrottle = True
	}
	MODULE
	{
		name = ModuleSurfaceFX
		thrustProviderModuleIndex = 0
		fxMax = 0.6
		maxDistance = 25
		falloff = 1.0
		thrustTransformName = thrustTransform
	}
	MODULE
	{
		name = ModuleGimbal
		gimbalTransformName = gimbalTransform
		gimbalRange = 4
		useGimbalResponseSpeed = true
		gimbalResponseSpeed = 10
	}
	MODULE
	{
		name = ModuleAlternator
		RESOURCE
		{
			name = ElectricCharge
			rate = 5.0
		}
	}
	RESOURCE
	{
		name = ElectricCharge
		amount = 0
		maxAmount = 0
		isTweakable = false
		hideFlow = true
	}
	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
		}
	}
}

