ACTOR GD2Chaingun : Weapon
{
   Weapon.SelectionOrder 700
   SCALE 0.9
   Decal "BulletChip"
   Weapon.AmmoUse 1
   Weapon.AmmoGive 20
   Weapon.AmmoType "GDMinigunAmmo"
   Inventory.PickupMessage "$GOTCHAINGUN" // "You got the chaingun"
   Obituary "%o was perforated by %k's Minigun." // "%o was mowed down by %k's chaingun."
   AttackSound "UACElite/MinigunFire"
   Weapon.UpSound "UACElite/MinigunSwap"
   Tag "Minigun"
   Inventory.RestrictedTo "UACEliteOfficerClass"
   States
   {
   Ready:
     GDCG A 1 A_WeaponReady
	 TNT1 A 0 A_StopSound(chan_5)
     Loop
   Deselect:
     GDCG A 1 A_Lower
	 TNT1 A 0 A_Lower
	 TNT1 A 0 A_Lower
	 TNT1 A 0 A_StopSound(chan_5)
     Loop
   Select:
     GDCG A 1 A_Raise
	 TNT1 A 0 A_Raise
	 TNT1 A 0 A_Raise
     Loop
   Fire:
     GDCG AB 1 A_PlaySound("UACElite/MinigunSpinup", chan_5, 4, 0)
	 GDCG BABA 3
	 GDCG BABABABA 2
	 GDCG ABABABABABABA 1
   HOLD:
	 TNT1 A 0 A_PlaySound("UACElite/MinigunRev", CHAN_AUTO,0.7)
	 GDCG CD 1 BRIGHT A_Firebullets(4.5,4.5,1,8)
	 TNT1 A 0 A_FireCustomMissile("pistolcasespawn",0,0,15,-5)
	 TNT1 A 0 A_SetPitch (pitch-0.15)
	 TNT1 A 0 A_JumpIfNoAmmo("SpinDownEmpty")
     GDCG B 0 A_ReFire("HOLD")
    Goto SpinDown
  SpinDownEmpty:
    Goto SpinDown
  SPINDOWN:
	 GDCG AB 1 A_PlaySound("UACElite/MinigunSpindown", chan_5, 4, 0)
	 GDCG ABABABABABABA 1
	 GDCG BABABABA 3
	 GDCG BABA 5
	 Goto Ready
   }
}

ACTOR GD2DoubleChaingun : Weapon
{
   SCALE 0.9
   Decal "BulletChip"
   Weapon.AmmoUse 1
   Weapon.AmmoGive 20
   Weapon.AmmoType "GDMinigunAmmo"
   Inventory.PickupMessage "$GOTCHAINGUN" // "You got the chaingun"
   Obituary "%o was perforated by %k's Dual Miniguns." // "%o was mowed down by %k's chaingun."
   Tag "Dual Miniguns"
   AttackSound "UACElite/MinigunFire"
   Weapon.UpSound "UACElite/MinigunSwap"
   Inventory.RestrictedTo "UACEliteOfficerClass"
   States
   {
   Ready:
     DBLC A 1 A_WeaponReady
	 TNT1 A 0 A_StopSound(chan_5)
     Loop
   Deselect:
     DBLC A 1 A_Lower
	 TNT1 A 0 A_Lower
	 TNT1 A 0 A_Lower
	 TNT1 A 0 A_StopSound(chan_5)
     Loop
   Select:
     DBLC A 1 A_Raise
	 TNT1 A 0 A_Raise
	 TNT1 A 0 A_Raise
     Loop
   Fire:
     DBLC AB 1 A_PlaySound("UACElite/MinigunSpinup", chan_5, 3, 0)
	 TNT1 AA 0 A_PlaySound("UACElite/MinigunSpinup", chan_5, 3, 0)
	 DBLC BABA 3
	 DBLC BABABABA 2
	 DBLC ABABABABABABA 1
   HOLD:
     TNT1 A 0 A_PlaySound("UACElite/MinigunRev", CHAN_AUTO,0.7)
	 TNT1 A 0 A_PlaySound("UACElite/MinigunRev", CHAN_AUTO,0.7)
	 DBLC CD 1 BRIGHT A_Firebullets(3,3,1,8)
	 DBLC CD 0 A_Firebullets(7.7,7.7,1,8)
	 TNT1 A 0 A_FireCustomMissile("pistolcasespawn2",0,0,-15,-8)
	 TNT1 A 0 A_FireCustomMissile("pistolcasespawn",0,0,15,-5)
	 TNT1 A 0 A_SetPitch (pitch-0.3)
     TNT1 A 0 A_JumpIfNoAmmo("SpinDownEmpty")
     DBLC B 0 A_ReFire("HOLD")
     Goto SpinDown
  SpinDownEmpty:
    Goto SpinDown
	SpinDown:
     DBLC AB 1 A_PlaySound("UACElite/MinigunSpindown", chan_5, 4, 0)
	 TNT1 AA 0 A_PlaySound("UACElite/MinigunSpindown", chan_5, 4, 0)
	 DBLC ABABABABABABA 1
	 DBLC BABABABA 3
	 DBLC BABA 5
	 Goto Ready
   }
}

Actor GDMinigunAmmo : Ammo
{
Inventory.Amount 50
Inventory.MaxAmount 500
Ammo.BackpackAmount 50
Ammo.BackpackMaxAmount 1000
}