PART
{
	name = CJEagle50Refinery
	module = Part
	author = ColdJ

	MODEL
	{
		model = Space199950/Parts/Eagle50Refinery
	}
	scale = 1
	rescaleFactor = 1
 fx_exhaustFlame_blue = 0.0, -3, 0.0, 0.0, 1.0, 0.0, running
	fx_exhaustLight_blue = 0.0, -3, 0.0, 0.0, 0.0, 1.0, running
	fx_smokeTrail_light = 0.0, 0.0, -3, 0.0, 1.0, 0.0, running
	fx_exhaustSparks_flameout = 0.0, -3, 0.0, 0.0, 1.0, 0.0, flameout
	sound_vent_medium = engage
	sound_rocket_hard = running
	sound_vent_soft = disengage
	sound_explosion_low = flameout
	CoMOffset = 0.0, 0.0, 2.32946432
	// --- node definitions: Position X, Position Y, Position Z, Up X, Up Y, Up Z

	node_stack_FrameDock = 0.0, 0.0, -0.0005, 0.0, 0.0, -1.0, 3
	//node_stack_Load = 0.0, 0.0, 3.1361, 0.0, 0.0, -1.0, 2

	node_stack_Right = 1.8805, 2.0776, 1.9607, 1.0, 0.0, 0.0, 2
	node_stack_Left = -1.8802, 2.0776, 1.9607, -1.0, 0.0, 0.0, 2

	TechRequired = advScienceTech
	entryCost = 24000
	cost = 8000
	category = Payload
	subcategory = 0
	title = Eagle50 Refinery Platform
	manufacturer = CJ Aeronautics
	description = This mobile processing plant can take ore and extract what is needed to make liquid fuel.
	attachRules = 1,0,1,1,1

	// --- standard part parameters ---
	mass = 4.00
	dragModelType = default
	maximum_drag = 0.2
	minimum_drag = 0.2
	angularDrag = 1
	crashTolerance = 50
	maxTemp = 3000 // = 3500
	bulkheadProfiles = size3, size2, srf
	vesselType = Ship
	tags = eagle50 ore refinery isru platform cck-EG50
	MODULE
	{
		name = ModuleOverheatDisplay
	}




	MODULE
	{
		 name = ModuleResourceConverter
		 ConverterName = LiquidFuel
		 StartActionName = Start Refinery
		 StopActionName = Stop Refinery
		AutoShutdown = true
		TemperatureModifier
		{
			key = 0 100000
			key = 750 50000
			key = 1000 10000
			key = 1250 500	
			key = 2000 50	
			key = 4000 0
		}				
		GeneratesHeat = true
		DefaultShutoffTemp = .8
		ThermalEfficiency 
		{
			key = 0 0 0 0
			key = 500 0.1 0 0
			key = 1000 1.0 0 0
			key = 1250 0.1 0 0
			key = 3000 0 0 0 
		}
		
		UseSpecialistBonus = true
		SpecialistEfficiencyFactor = 0.2
		SpecialistBonusBase = 0.05
		UseSpecialistHeatBonus = true
		SpecialistHeatFactor = 0.1
		ExperienceEffect = ConverterSkill
		EfficiencyBonus = 1
		resourceOutputName = #autoLOC_8012032		// #autoLOC_8012032 = LqdFuel

		 
		 INPUT_RESOURCE
		 {
			ResourceName = Ore
			Ratio = 0.5
			FlowMode = STAGE_PRIORITY_FLOW
  		 }
		 INPUT_RESOURCE
		 {
			ResourceName = ElectricCharge
			Ratio = 15
		 }
		 OUTPUT_RESOURCE
		 {
			ResourceName = LiquidFuel
			Ratio = 1
			DumpExcess = false
			FlowMode = STAGE_PRIORITY_FLOW
		 }
	}

	

	

	MODULE
	{
		name = ModuleCoreHeat
		CoreTempGoal = 1000					//Internal temp goal - we don't transfer till we hit this point
		CoreToPartRatio = 0.1				//Scale back cooling if the part is this % of core temp
		CoreTempGoalAdjustment = 0			//Dynamic goal adjustment
		CoreEnergyMultiplier = 0.1			//What percentage of our core energy do we transfer to the part
		HeatRadiantMultiplier = 0.05		//If the core is hotter, how much heat radiates?
		CoolingRadiantMultiplier = 0		//If the core is colder, how much radiates?
		HeatTransferMultiplier = 0			//If the part is hotter, how much heat transfers in?
		CoolantTransferMultiplier = 0.01	//If the part is colder, how much of our energy can we transfer?
		radiatorCoolingFactor = 1			//How much energy we pull from core with an active radiator?  >= 1
		radiatorHeatingFactor = 0.05		//How much energy we push to the active radiator
		MaxCalculationWarp = 1000			//Based on how dramatic the changes are, this is the max rate of change
		CoreShutdownTemp = 4000				//At what core temperature do we shut down all generators on this part?
		MaxCoolant = 200					//Maximum amount of radiator capacity we can consume - 50 = 1 small
	}
	MODULE
	{
		name = ModuleCommand
		minimumCrew = 0
		RESOURCE
		{
			name = ElectricCharge
			rate = 0.04
		}
		hasHibernation = True
		hibernationMultiplier = 0.25
		defaultControlPointDisplayName = #autoLOC_6011001 //#autoLOC_6011001 = Forward
		CONTROLPOINT
		{
			name = up
			displayName = #autoLOC_6011000 //#autoLOC_6011000 = Up
			orientation = -90,0,0
		}
		CONTROLPOINT
		{
			name = reverse
			displayName = #autoLOC_6011004 //#autoLOC_6011004 = Reversed
			orientation = 0,0,180
		}
	}
	MODULE
	{
		name = ModuleSAS
		SASServiceLevel = 3
	}
	MODULE
	{
		name = ModuleDockingNode
		referenceAttachNode = FrameDock
		nodeType = size3
		aquireForce = 20.5
		aquireRange = 15
		captureRange = 10
		stagingEnabled = False
		ejectionForce = 10
	}


	MODULE
	{
		name = ModuleAnimateGeneric  //Effects 
		animationName = Piston
		startEventGUIName = Raise Pads
		endEventGUIName = Lower Pads
		actionGUIName = Toggle Pads
		deployEffectName = deploy

		//defaultActionGroup = Gear
		postDeployEffectName = deployed
 
		postDeployEffectLength = 5.0
		retractEffectName = retract

		postRetractEffectName = retracted
 
		postRetractEffectLength = 5.0

		animSpeed = 1

		layer = 1	
	}



	MODULE
	{
		name = ModuleEngines
		thrustVectorTransformName = MainThrust
		exhaustDamage = True
		ignitionThreshold = 0.1
		minThrust = 0
		maxThrust = 1000
		heatProduction = 196
		fxOffset = 0, 0, 0
		EngineType = LiquidFuel
		exhaustDamageDistanceOffset = 0.56
		PROPELLANT
		{
			name = ElectricCharge
			ratio = 10.0
			DrawGauge = True
		}
		PROPELLANT
		{
			name = LiquidFuel
			ratio = 0.2
			DrawGauge = True
		}
		atmosphereCurve
		{
			key = 0 80000 0 0

		}
	}

	RESOURCE
	{
		name = ElectricCharge
		amount = 1000
		maxAmount = 1000
	}
	RESOURCE
	{
		name = LiquidFuel
		amount = 200
		maxAmount = 200
	}
	MODULE
	{
		name = ModuleTestSubject
		useStaging = True
		useEvent = True
		situationMask = 60
		CONSTRAINT
		{
			// disable all but home
			type = SITUATION
			value = 0
			body = _NotHome
			prestige = Trivial
		}
		CONSTRAINT
		{
			// disable all but home
			type = SITUATION
			value = 0
			body = _NotHome
			prestige = Significant
		}
		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 = 0
			situationMask = 8
			prestige = Significant
		}
		CONSTRAINT
		{
			type = SPEED
			test = LT
			value = 900
			situationMask = 8
			prestige = Significant
		}
		CONSTRAINT
		{
			type = SPEED
			test = GT
			value = 300
			situationMask = 8
			prestige = Exceptional
		}
		CONSTRAINT
		{
			type = SPEED
			test = LT
			value = 1200
			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 = ModuleSurfaceFX
		thrustProviderModuleIndex = 0
		fxMax = 1
		maxDistance = 80
		falloff = 2
		thrustTransformName = MainThrust
	}

	MODULE
	{
		name = ModuleToggleCrossfeed
		crossfeedStatus = true
		toggleEditor = true
		toggleFlight = true
	}



	MODULE
	{
		name = ModuleReactionWheel
		actionGUIName = Toggle Reaction Wheel
		PitchTorque = 200
		YawTorque = 100
		RollTorque = 100
		RESOURCE
		{
			name = ElectricCharge
			rate = 0.24
		}
	}
	MODULE
	{
		name = ModuleLight
		lightName = Spotlight
		lightMeshRendererName = LightBar
		useAnimationDim = True
		lightBrightenSpeed = 2.5
		lightDimSpeed = 2.5
		resourceAmount = 0.02
		//animationName = 
		useResources = False
	}
	RESOURCE
	{
		name = Ore
		amount = 0
		maxAmount = 300
	}


}
