PART
{
	name = ExplosiveDecoupler_TNT06N
	module = Part
	author = Crashtestdummy87

	MODEL
	{
		model = Squad/Parts/Coupling/Assets/Decoupler_0
		scale = 1.0, 2.0, 1.0
	}
	rescaleFactor = 1.0

	// Nodes perfectly matched to the TNT-06
	node_stack_top = 0.0, 0.065, 0.0, 0.0, 1.0, 0.0, 0
	node_stack_bottom = 0.0, -0.065, 0.0, 0.0, -1.0, 0.0, 0

	TechRequired = engineering101
	category = Coupling
	subcategory = 0
	
	entryCost = 400000
	cost = 15000
	title = TNT-06N eco Decoupler
	manufacturer = Crash Test Demolabs
	description = The TNT-06N is the direct result of J. Robert Kerman accidentally knocking a 50-gallon drum of experimental neutron gel over the assembly line while reaching for a dropped snack. By the time the mistake was noticed, dozens of units had already been welded shut and were glowing a vibrant, toxic green. Rather than issuing an expensive safety recall, C.T.D.'s board of directors did what any responsible aerospace company would do: they multiplied the price tag by fifty, slapped an "Eco-Friendly Neutralizer" sticker on it, and declared it a breakthrough in space cleaning.
	
	attachRules = 1,0,1,1,0
	mass = 0.5
	dragModelType = default
	maximum_drag = 0.2
	minimum_drag = 0.2
	angularDrag = 2
	crashTolerance = 9
	maxTemp = 800
	skinMaxTemp = 2000
	fuelCrossFeed = False
	stageOffset = 1
	childStageOffset = 1
	bulkheadProfiles = size0

	MODULE
	{
		name = ModuleDecouple
		ejectionForce = 300
		isOmniDecoupler = false
		explosiveNodeID = top		
	}
	
	// =========================================================
	// CUSTOM EXPLOSION MODULE
	// =========================================================
	MODULE
	{
		name = ModuleDelayedExplosion
		explosionVisualScale = 300
		centerDamage = 20000
		maxDamageRadius = 100
		shrapnelCount = 200
		shrapnelDrag = 0.05
		shrapnelMass = 1000
		shrapnelSpeed = 250
		isGreenVisuals = true
		
		// Configurable Light Settings
		glowIntensity = 2.0
		glowRange = 3.0

		// Cherenkov Flash Configurable Settings
		flashRange = 150.0
		flashIntensity = 15.0
		
		// Time-Sliced Blast Wave Speed (m/s)
		blastWaveSpeed = 100.0
	}

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

	MODULE
	{
		name = ModuleCargoPart
		packedVolume = 100
	}

	// =========================================================
	// CUSTOM RTG GENERATOR
	// =========================================================
	MODULE
	{
		name = ModuleRadiationTrickle
		isAlwaysActive = true
		OUTPUT_RESOURCE
		{
			name = ElectricCharge
			rate = 0.05 
		}
	}
}

// =========================================================
// KERBALISM RADIATION PATCH
// =========================================================
// Note: This must remain outside the main PART block. 
// KSP's ModuleManager reads this and injects it automatically if Kerbalism is installed.
@PART[ExplosiveDecoupler_TNT06N]:NEEDS[Kerbalism]
{
	MODULE
	{
		name = Emitter
		radiation = 0.0046296   // Delivers 100 rads over 1 Kerbin Day (6 hours) at 1 meter
	}
}