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

// --- asset parameters ---
MODEL
{
  model = ShadowWorks/Parts/AdaptersAndFairings/5mFairing
}
rescaleFactor = 1.0


// --- node definitions ---
node_stack_top = 0.0, 1.054, 0.0, 0.0, 1.0, 0.0, 2
node_stack_bottom = 0.0, -0.50, 0.0, 0.0, -1.0, 0.0, 3

// -- Orion Attachment for Altair --
node_stack_orion1 = 0.0, 8.51, 0.00, 0.00, 1.0, 0.0, 2
node_stack_orion1F1 = 0.0, 7.324, -1.625, 0.0, 1.0, 0.0, 1
node_stack_orion1F2 = 1.407, 7.324, 0.8125, 0.0, 1.0, 0.0, 1
node_stack_orion1F3 = -1.407, 7.324, 0.8125, 0.0, 1.0, 0.0, 1


// --- FX definitions ---

fx_gasBurst_white = 0.0, 0.3, 0.0, 0.0, 1.0, 0.0, deploy


// --- Sound FX definition ---

sound_vent_large = deploy

// --- editor parameters ---
TechRequired = heavierRocketry
entryCost = 9800
cost = 1200
category = Payload
subcategory = 0
title = Amun-Ra 5m Fairing Base SW-FB-03
manufacturer = ShadowWorks
description = A 5m fairing base for the Amun-Ra, Hathor, or other 5m launchers.  The fairing base has three mounting points above the base for mounting the Osiris spacecraft and its fairing walls with or without payloads.  There are two integrated decoupling mechanisms, one to allow decoupling of the Osiris spacecraft at the time of fairing staging, and one integrated with the fairing plate that is staging-disabled.  No extra decouplers are necessary.

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

// --- standard part parameters ---
mass = 0.5
thermalMassModifier = 4.0 // from stock fairings
skinMassPerArea = 4.0 // from stock fairings
skinInternalConductionMult = 0.25 // from stock fairings
emissiveConstant = 0.95 // from stock fairings
dragModelType = default
maximum_drag = 0.2
minimum_drag = 0.2
angularDrag = 0.2
crashTolerance = 9
breakingForce = 1200
breakingTorque = 1200
maxTemp = 2600
bulkheadProfiles = size5
stageOffset = 1
childStageOffset = 1
tags = aero cap cargo cone contain fairing payload protect 5m sls jupiter amun ra amun-ra hathor eds kds jus hus shadowworks

	MODULE
	{
		name = ModuleProceduralFairing
		
		nSides = 64
		nArcs = 2
		TextureURL = Squad/Parts/Aero/fairings/fairings_diff
		
		panelGrouping = 3
		pivot = 0,0.50,0
		axis = 0,1,0
		
		baseRadius = 2.5
		maxRadius = 6
		capRadius = 0.375
		snapThreshold = 0.25
		
		xSectionHeightMin = 0.3
		xSectionHeightMax = 4
		
		edgeSlide = 0.15
		edgeWarp = 0.02
		noseTip = 0.5
		
		UnitAreaMass = 0.06
		UnitAreaCost = 18
	}
	MODULE
	{
		name = ModuleCargoBay
		DeployModuleIndex = 0
		closedPosition = 0
		lookupRadius = 2.5
		partTypeName = Fairing
		
		// nodeOuterAftID = bottom
		// nodeInnerAftID = top
	}

MODULE
{
	name = ModulePartVariants
	baseVariant = LanderPayload
	baseDisplayName = Lander Payload

	VARIANT
	{
		name = LanderPayload
		displayName = Lander Payload

		primaryColor = #ffffff
		secondaryColor = #ffffff

		EXTRA_INFO
		{
			BaseMaterialName = FairingAdapterColor
			BaseTextureName = ShadowWorks/Parts/AdaptersAndFairings/FairingAdapterColor
		}
		NODES
		{
			node_stack_orion1 = 0.0, 8.51, 0.00, 0.00, 1.0, 0.0, 2
			node_stack_orion1F1 = 0.0, 7.324, -1.625, 0.0, 1.0, 0.0, 1
			node_stack_orion1F2 = 1.407, 7.324, 0.8125, 0.0, 1.0, 0.0, 1
			node_stack_orion1F3 = -1.407, 7.324, 0.8125, 0.0, 1.0, 0.0, 1
		}
	}

	VARIANT
	{
		name = NoPayload
		displayName = No Payload

		primaryColor = #aaaaaa
		secondaryColor = #aaaaaa

		EXTRA_INFO
		{
			BaseMaterialName = FairingAdapterColor
			BaseTextureName = ShadowWorks/Parts/AdaptersAndFairings/FairingAdapterColor
		}
		NODES
		{
			node_stack_orion1 = 0.0, 4.51, 0.00, 0.00, 1.0, 0.0, 2
			node_stack_orion1F1 = 0.0, 3.324, -1.625, 0.0, 1.0, 0.0, 1
			node_stack_orion1F2 = 1.407, 3.324, 0.8125, 0.0, 1.0, 0.0, 1
			node_stack_orion1F3 = -1.407, 3.324, 0.8125, 0.0, 1.0, 0.0, 1
		}
	}

	VARIANT
	{
		name = TallPayload
		displayName = Tall Payload

		primaryColor = #000000
		secondary Color = #000000

		EXTRA_INFO
		{
			BaseMaterialName = FairingAdapterColor
			BaseTextureName = ShadowWorks/Parts/AdaptersAndFairings/FairingAdapterColor
		}
		NODES
		{
			node_stack_orion1 = 0.0, 11.51, 0.00, 0.00, 1.0, 0.0, 2
			node_stack_orion1F1 = 0.0, 10.324, -1.625, 0.0, 1.0, 0.0, 1
			node_stack_orion1F2 = 1.407, 10.324, 0.8125, 0.0, 1.0, 0.0, 1
			node_stack_orion1F3 = -1.407, 10.324, 0.8125, 0.0, 1.0, 0.0, 1
		}
	}
}

	MODULE
	{
		name = ModuleDecouple
		explosiveNodeID = orion1
		isOmniDecoupler = false
		ejectionForce = 1
		stagingEnabled = true
	}
	MODULE
	{
		name = ModuleDecouple
		explosiveNodeID = top
		isOmniDecoupler = false
		ejectionForce = -100
		stagingEnabled = false
	}

	MODULE
	{
		name = ModuleTestSubject
		useStaging = True
		useEvent = False
		situationMask = 127
		CONSTRAINT
		{
			type = ATMOSPHERE
			value = True
		}
		CONSTRAINT
		{
			type = REPEATABILITY
			value = ALWAYS
			prestige = Trivial
		}
		CONSTRAINT
		{
			type = REPEATABILITY
			value = BODYANDSITUATION
			prestige = Significant
		}
		CONSTRAINT
		{
			type = REPEATABILITY
			value = ONCEPERPART
			prestige = Exceptional
		}
		CONSTRAINT
		{
			type = ALTITUDE
			test = GT
			value = 0 // this just registers altitude as something to care about
			situationMask = 8
		}
		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 = SPEED
			test = LT
			value = 2000
			situationMask = 8
		}
		CONSTRAINT
		{
			type = ALTITUDE
			test = LT
			value = 300000
			situationMask = 16
			body = _NotSun
		}
		CONSTRAINT
		{
			type = ALTITUDE
			test = LT
			value = 600000
			situationMask = 32
			body = _NotSun
		}
	}

	
}





