PART
{
// Kerbal Space Program - Part Config
//
//

// --- general parameters ---
name = BDAcGKmk2
module = Part
author = BahamutoD

// --- asset parameters ---
MODEL
{
	model = BDArmory/Parts/GoalKeeperBDAcMk2/BDAcGKmk2

}
rescaleFactor = 1



// --- node definitions ---
node_attach = 0.0, -0.0, 0, 0, -1, 0, 0
node_stack_bottom = 0.0, -0.0, 0, 0, -1, 0, 2

// --- editor parameters ---
TechRequired = precisionEngineering
entryCost = 10000
cost = 8000
category = none
bdacategory = Gun turrets
subcategory = 0
bulkheadProfiles = size2, srf
title = #loc_BDArmory_part_BDAcGKmk2_title  //Goalkeeper MK2 CIWS
manufacturer = #loc_BDArmory_agent_title  //Bahamuto Dynamics
description = #loc_BDArmory_part_BDAcGKmk2_description  //A 7 barrel 30mm rotary cannon with full swivel range. This MK 2 version was found covered in overspray and paint cans around the back of the hangar at the old KSC,  developed from the MK1 to reduce the incidence of hearing loss amongst early target pointers. This MK2 has some slight advantages over the MK1, equipped with Infra red targeting and Radar data receiver    The 30x173mm high explosive rounds are only a slight improvement over the MK1 ammunition in that they at least take slightly longer to lose interest in flying and so have a good chance of reaching the target, but this weapon was never equipped to feature automatic fuse timing.
// attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision
attachRules = 1,1,0,0,1
tags = #loc_BDArmory_part_bahaGoalKeeper_tags 
// --- standard part parameters ---
mass = 4.4
dragModelType = default
maximum_drag = 0.2
minimum_drag = 0.2
angularDrag = 2
crashTolerance = 50
maxTemp = 3600

stagingIcon = SOLID_BOOSTER

MODULE
	{
		name = ModuleTurret
		turretID = 0

		pitchTransformName = pitchTransform
		yawTransformName = yawTransform

		pitchSpeedDPS = 80
		yawSpeedDPS = 80

		maxPitch = 85
		minPitch = -15

		yawRange = 360

		smoothRotation = true
		smoothMultiplier = 10

		audioPath = BDArmory/Sounds/hydraulicLoop
		maxAudioPitch = 0.365
		minAudioPitch = 0.255
		maxVolume = 0.55
	}

	MODULE
	{
		name = ModuleWeapon
		turretID = 0

		fireTransformName = fireTransform

		hasDeployAnim = false

		hasFireAnimation = true
		fireAnimName = BDAcGKmk2
		spinDownAnimation = true
		SpoolUpTime = 0.3
		roundsPerMinute = 4200
		maxDeviation = 0.241 //5.5mrad
		maxEffectiveDistance = 4000
		maxTargetingRange = 5000

		ammoName = 30x173Ammo
		bulletType = 30x173Bullet
		requestResourceAmount = 1

		hasRecoil = true
		onlyFireInRange = true
		bulletDrop = true

		weaponType = ballistic
		isAPS = true
		APSType = missile
		dualModeAPS = true

		tracerLength = 0
		tracerDeltaFactor = 2.75
		tracerInterval = 2

		maxHeat = 3600
		heatPerShot = 36
		heatLoss = 900

		shellScale = 0.76

		fireSoundPath = BDArmory/Parts/gau-8/sounds/GAU8Cannon
		overheatSoundPath = BDArmory/Parts/gau-8/sounds/GAU8End
		oneShotSound = false

		//explosion
		explModelPath = BDArmory/Models/explosion/30mmExplosion
		explSoundPath = BDArmory/Sounds/subExplode
	}


MODULE
{
	name = ModuleTargetingCamera
	cameraTransformName = camTransform
	eyeHolderTransformName = eyeHolderTransform
	zoomFOVs = 40,15,3,1
	gimbalLimit = 10
}
MODULE
{
        name = ModuleRadar

        // -- Section: General Configuration --
        radarName = Goalkeeper Data Receiver		// if left empty part.title is used, but advised to set this to a nice printable text
        //rwrThreatType = 0				// IMPORTANT, please set correctly:
                                // 0 = SAM site radar
                                // 1 = Fighter radar (airborne)
                                // 2 = AWACS radar (airborne)
                                // 3, 4 = ACTIVE MISSILE (DO NOT USE UNLESS YOU KNOW WHAT YOU'RE DOING!
                                // 5 = Detection radar (ground/ship based)
                                // 6 = SONAR (ship/submarine based)
        //rotationTransformName = scanRotation
	//turretID = 0					// if needed
        resourceDrain = 0.25				// change to higher values for more capable radars, e.g AESA

        // -- Section: Capabilities --
        //omnidirectional = true				// false: boresight scan radar
        //directionalFieldOfView = 90			// for omni and boresight
        //boresightFOV = 10				// for boresight only
        //scanRotationSpeed = 240				// degress per second
        //lockRotationSpeed = 120				// only relevant if canLock
        //lockRotationAngle = 4
        showDirectionWhileScan = true			// can show target direction on radar screen. False: radar echos displayed as block only (no direction)
        //multiLockFOV = 30				// only relevant if canLock
        //lockAttemptFOV = 2				// only relevant if canLock
        //maxLocks = 1					//how many targets can be locked/tracked simultaneously. only relevant if canLock

        canScan = false					// scanning/detecting targets (volume search)
        canLock = false					// locking/tracking targets (fire control)
        canTrackWhileScan = false			// continue scanning while tracking a locked target
        canReceiveRadarData = true			// can work as passive data receiver

        minSignalThreshold = 350				// DEPRECATED, NO LONGER USED! use detection float curve!
        minLockedSignalThreshold = 120			// DEPRECATED, NO LONGER USED! use locktrack float curve!

        radarGroundClutterFactor = 0.1			// how much is the radar efficiency reduced to by ground clutter/look-down?
                                // 0.0 = reduced to 0% (very hard to detect ground targets)
                                // 1.0 = fully efficient (no difference between air & ground targets)
                                // values >1.0 are possible, meaning the radar is MORE efficient during look down than vs aireal targets.

        radarDetectionCurve
        {
          // floatcurve to define at what range (km) which minimum cross section (m^2) can be detected.
          // this defines both min/max range of the radar, and sensitivity/efficiency
          // it is recommended to define an "assured detection range", at which all craft are detected regardless
          //     of their rcs. This is achieved by using a minrcs value of zero, thus detecting everything.
          //        key = distance	rcs

    		// nothing defined here as this radar does not support scanning on its own
        }

        radarLockTrackCurve
        {
            // same as detectionCurve, just for locking/tracking purpose
            // ATTENTION: DO NOT USE an "assured locking range" here, as this would render lock-breaking
            //   ECM-jammers & chaff completely ineffective!!
            //      key = distance	rcs

    		// nothing defined here as this radar does not support locking
        }


}
}
