@PART[WarpDrive*]:NEEDS[B9PartSwitch]:FOR[WarpDrive]
{
	%addCostUpdateNull = #$cost$
	@addCostUpdateNull *= -0.9	
	%addCostUpdate1 = #$cost$
	@addCostUpdate1 *= 1
	%addCostUpdate2 = #$cost$
	@addCostUpdate2 *= 2
	%addCostUpdate3 = #$cost$
	@addCostUpdate3 *= 3

	%upgradeStatusUpdateNull   = #WD_upgradeStatusUpdateNull
	%upgradeStatusUpdate0      = #WD_upgradeStatusUpdate0   
	%upgradeStatusUpdate1      = #WD_upgradeStatusUpdate1   
	%upgradeStatusUpdate2      = #WD_upgradeStatusUpdate2   
	%upgradeStatusUpdate3      = #WD_upgradeStatusUpdate3   
	
	%basedrivePower            = #$MODULE[StandAloneAlcubierreDrive]/drivePower$
	%basecontainmentFieldPower = #$MODULE[StandAloneAlcubierreDrive]/containmentFieldPower$
	
	%drivePowerUpdate1 = #$basedrivePower$
	@drivePowerUpdate1 *= 2
	%drivePowerUpdate2 = #$basedrivePower$
	@drivePowerUpdate2 *= 4
	%drivePowerUpdate3 = #$basedrivePower$
	@drivePowerUpdate3 *= 8

	%containmentFieldPowerUpdate1 = #$basecontainmentFieldPower$
	@containmentFieldPowerUpdate1 *= 2
	%containmentFieldPowerUpdate2 = #$basecontainmentFieldPower$
	@containmentFieldPowerUpdate2 *= 3
	%containmentFieldPowerUpdate3 = #$basecontainmentFieldPower$
	@containmentFieldPowerUpdate3 *= 4

	MODULE
	{
		name = ModuleB9PartSwitch
		moduleID = warpSwitch
		switcherDescription = #WD_WarpSwitch
		affectDragCubes = False
		affectFARVoxels = False
		//switchInFlight = True
			
		SUBTYPE
	    {
			name = #$../../upgradeStatusUpdateNull$
			title = #$../../upgradeStatusUpdateNull$
			//descriptionSummary = 
			//descriptionDetail = 
			addedCost = #$../../addCostUpdateNull$
			defaultSubtypePriority = 0
			primaryColor = #808080
			//secondaryColor =
			
			MODULE
			{
				IDENTIFIER
				{
					name = StandAloneAlcubierreDrive
				}
				DATA 
				{
					upgradeStatus = #$../../../../upgradeStatusUpdateNull$
					containmentFieldPower = 0
					drivePower = 0
				}
				//moduleActive = false
			}
	    }	
		
		SUBTYPE
	    {
			name = #$../../upgradeStatusUpdate0$
			title = #$../../upgradeStatusUpdate0$
			//descriptionSummary = 
			//descriptionDetail = 
			addedCost = 0
			defaultSubtypePriority = 1
			primaryColor = #9DADBC 
	    }
		
		SUBTYPE
	    {
			name  = #$../../upgradeStatusUpdate1$
			title = #$../../upgradeStatusUpdate1$
			//descriptionSummary = 
			//descriptionDetail = 
			upgradeRequired = WarpDrive_Upgrade1
			addedCost = #$../../addCostUpdate1$
			defaultSubtypePriority = 0
			primaryColor = #256147
			
			MODULE
			{
				IDENTIFIER
				{
					name = StandAloneAlcubierreDrive
				}
				DATA 
				{
					upgradeStatus = #$../../../../upgradeStatusUpdate1$
					containmentFieldPower = #$../../../../containmentFieldPowerUpdate1$
					drivePower = #$../../../../drivePowerUpdate1$
				}
			}
	    }		
		
		SUBTYPE
	    {
			name  = #$../../upgradeStatusUpdate2$
			title = #$../../upgradeStatusUpdate2$
			//descriptionSummary =
			//descriptionDetail = 
			upgradeRequired = WarpDrive_Upgrade2
			addedCost = #$../../addCostUpdate2$
			defaultSubtypePriority = 0
			primaryColor = #514132
			
			MODULE
			{
				IDENTIFIER
				{
					name = StandAloneAlcubierreDrive
				}
				DATA 
				{
					upgradeStatus = #$../../../../upgradeStatusUpdate2$
					containmentFieldPower = #$../../../../containmentFieldPowerUpdate2$
					drivePower = #$../../../../drivePowerUpdate2$
				}
			}
	    }	
		
		SUBTYPE
	    {
			name  = #$../../upgradeStatusUpdate3$
			title = #$../../upgradeStatusUpdate3$
			//descriptionSummary =
			//descriptionDetail = 
			upgradeRequired = WarpDrive_Upgrade3
			addedCost = #$../../addCostUpdate3$
			defaultSubtypePriority = 0
			primaryColor = #B9A81C
			
			MODULE
			{
				IDENTIFIER
				{
					name = StandAloneAlcubierreDrive
				}
				DATA 
				{
					upgradeStatus = #$../../../../upgradeStatusUpdate3$
					containmentFieldPower = #$../../../../containmentFieldPowerUpdate3$
					drivePower = #$../../../../drivePowerUpdate3$
				}
			}
	    }	
		
	}
}


// Add Power value to B9PS Subtype Description
@PART[WarpDrive*]:NEEDS[B9PartSwitch]:FOR[WarpDrive]
{
	@MODULE[ModuleB9PartSwitch]:HAS[#moduleID[warpSwitch]]
	{
		@SUBTYPE,0 { %descriptionDetail = #WD_descriptionUpdateNull }
		@SUBTYPE,1 { %descriptionDetail = #<b>WarpDrive Power</b>: $../../MODULE[StandAloneAlcubierreDrive]/drivePower$\n<b>Containment Field Power</b>: $../../MODULE[StandAloneAlcubierreDrive]/containmentFieldPower$  }
		@SUBTYPE,2 { %descriptionDetail = #<b>WarpDrive Power</b>: $MODULE/DATA/drivePower$\n<b>Containment Field Power</b>: $MODULE/DATA/containmentFieldPower$  }
		@SUBTYPE,3 { %descriptionDetail = #<b>WarpDrive Power</b>: $MODULE/DATA/drivePower$\n<b>Containment Field Power</b>: $MODULE/DATA/containmentFieldPower$  }
		@SUBTYPE,4 { %descriptionDetail = #<b>WarpDrive Power</b>: $MODULE/DATA/drivePower$\n<b>Containment Field Power</b>: $MODULE/DATA/containmentFieldPower$  }
	}
}


@PART[WarpDrive*]:NEEDS[B9PartSwitch]:FOR[WarpDrive]
{
	-addCostUpdate*       = none
	-upgradeStatusUpdate* = none	

	-basedrivePower               = none
	-basecontainmentFieldPower    = none
	-drivePowerUpdate*            = none
	-containmentFieldPowerUpdate* = none
}
