Subsystem: AutocannonSupport
	Name: #AUTOCANNON_NAME
	Description: #AUTOCANNON_DESC
	BaseColor: #b746f9
	TypeColor: #b746f9
	Picture: SubsystemButtonArt::4
	Elevation: 2

	Tags: WeaponBase, Category:Weapons, Rotatable, HexLimitArc
	Tags: ExteriorCore, Weapon, DefaultUnlock, IsExplosiveWeapon, HasInternals, MainDPS
	Hull: Support, Satellite
	
	Size := HexSize * Hexes
	Range := (Size/2 + 250) * 2
	//Damage := Size * 3.0
	Damage := Size * 4.5
	Reload := 3 * (1.0 + Size/512)
	Speed := max(60, Range / 20)
	//Speed := max(120, Range / 10)
	Spread := 0.015 / max(Range / 600, 1)
	Tracking := 0.5
	FireArc := 1.0
	Pierce := 0
//	Radius := 1.5 + (log(Size) / log(2) * 6.0)
	Radius := 1.0 + (log(Size*6) / log(2))
	SupplyCost := Size * 1.25

	
	Hex.HP := 18 * HexSize
	Hex.Resistance := 0.2
	Hex.Mass := HexSize

	Hex.BuildCost := 0.75 * HexSize
	Hex.LaborCost := 0.07 * HexSize

	Requires:
		Command = 1
	
	Module: Default
	
	Module: Core
		Hex.HP := Hex.HP * 3
		Hex.BuildCost := 5.0 * Hex.BuildCost
		Hex.Mass := 5.0 * Hex.Mass

		Sprite: MissileLauncher::0
		DrawMode: 1

		Hex.DamageResist := ShipSize / 64.0
		Effect: DamageResist
			Resist = Hex.DamageResist

	Effector: Autocannon
		Range = Range
		Damage = Damage
		Reload = Reload
		Speed = Speed
		Tracking = Tracking
		Radius = Radius
		Spread = Spread
		FireArc = FireArc
		TargetTolerance = max(pi,FireArc + pi/4)
		FireTolerance = Spread * 3
		Pierce = Pierce
		SupplyCost = SupplyCost * Reload
		CapOnTarget = 24
