
ACTOR RLShredderShotgun : RLWeapon
{
  Obituary "%o was discombobulated by %k's hunting shotgun."
  Decal BulletChip
  Tag "Shredder Shotgun"
  Weapon.SelectionOrder 1500
  Weapon.SlotNumber 3
  Weapon.AmmoUse1 2
  Weapon.AmmoGive1 0
  Weapon.AmmoType1 "RLShredderShotgunClip"
  Weapon.AmmoType2 "Shell"
  Inventory.Icon "SHRSICON"
  States
  {
  Ready:
	TNT1 A 0 A_JumpIfInventory("RLMisfireSpamPreventionCooldown",1,"MisfirePrevention")
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunNanoMod",1,3)
	TNT1 A 0 A_GunFlash ("FlashIdle", GFF_NOEXTCHANGE)
    SHRS A 5 A_WeaponReady (WRF_ALLOWZOOM | WRF_ALLOWRELOAD)
    Loop
  NanoRegenCheck:
	TNT1 A 0 A_GunFlash ("FlashIdleRegen", GFF_NOEXTCHANGE)
    SHRS A 1 A_WeaponReady (WRF_ALLOWZOOM | WRF_ALLOWRELOAD)
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunClip", 2, "Ready")
    SHRS A 34 A_WeaponReady (WRF_ALLOWZOOM | WRF_ALLOWRELOAD)
  NanoRegenCheckContinue:
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunClip", 2, "Ready")
  NanoRegen:
	TNT1 A 0 A_GunFlash ("FlashIdleRegen", GFF_NOEXTCHANGE)
	TNT1 A 0 A_GiveInventory("RLShredderShotgunClip", 1)
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunBulkMod", 1, 2)
	TNT1 A 0 A_GiveInventory("RLShredderShotgunShredderClip", 10)
    Goto NanoRegenTimer
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunBulkMod", 2, 2)
	TNT1 A 0 A_GiveInventory("RLShredderShotgunShredderClip", 12)
    Goto NanoRegenTimer
	TNT1 A 0 A_GiveInventory("RLShredderShotgunShredderClip", 14)
    Goto NanoRegenTimer
  NanoRegenTimer:
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunNanoMod",2,2)
    SHRS A 17 A_WeaponReady (WRF_ALLOWZOOM | WRF_ALLOWRELOAD)
    Goto NanoRegenCheckContinue
    SHRS A 9 A_WeaponReady (WRF_ALLOWZOOM | WRF_ALLOWRELOAD)
    Goto NanoRegenCheckContinue
  ScavengerDrop:
	TNT1 A 0 A_JumpIfInventory("RLScavengerDrop",1,"WeaponDropConfirm")
	TNT1 A 0 A_GiveInventory("RLScavengerDrop",1)
	TNT1 A 0 A_Print("Press again to drop current weapon,\nor press \crAlt Fire\c- to scrap it to retrieve a Mod Pack.")
	Goto AfterModDrop
  WeaponDropConfirm:
	TNT1 A 0 A_GiveInventory("RLMisfireSpamPreventionCooldown",1)
	TNT1 A 0 A_TakeInventory("RLScavengerDrop",1)
	TNT1 A 0 A_TakeInventory("RLWeaponDrop",1)
	TNT1 A 0 A_GunFlash ("FlashDrop", GFF_NOEXTCHANGE)
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunModLimit", 1, "WeaponDropModded")
	TNT1 A 0 A_SpawnItemEx("RLShredderShotgunPickup", 0, 0, 40, 12, 0, 0, 0, SXF_SETMASTER)
	Goto WeaponDropRemoval
  WeaponDropModded:
	TNT1 A 2 A_SpawnItemEx("RLShredderShotgunPickupModded", 0, 0, 40, 12, 0, 0, 0, SXF_SETMASTER)
  WeaponDropRemoval:
    TNT1 A 0 A_TakeInventory("RLShredderShotgunModLimit", 2)
    TNT1 A 0 A_TakeInventory("RLShredderShotgunPowerMod", 2)
    TNT1 A 0 A_TakeInventory("RLShredderShotgunBulkMod", 2)
    TNT1 A 0 A_TakeInventory("RLShredderShotgunAgilityMod", 2)
    TNT1 A 0 A_TakeInventory("RLShredderShotgunTechnicalMod", 2)
    TNT1 A 0 A_TakeInventory("RLShredderShotgunSniperMod", 2)
    TNT1 A 0 A_TakeInventory("RLShredderShotgunFirestormMod", 2)
    TNT1 A 0 A_TakeInventory("RLShredderShotgunNanoMod", 2)
	TNT1 A 0 A_GiveInventory("RLRarityTokenRemover", 1)
	TNT1 A 0 A_TakeInventory("RLShredderShotgunSelected", 1)
	TNT1 A 0 A_TakeInventory("RLWeaponLimit",1)
	TNT1 A 1 A_TakeInventory("RLShredderShotgun",1)
	Stop
	
  AfterModDrop:
	TNT1 A 0 A_GunFlash ("FlashIdleRegen", GFF_NOEXTCHANGE)
    SHRS A 8 A_WeaponReady (WRF_NOSECONDARY | WRF_ALLOWRELOAD)
    Goto Ready
  MisfirePrevention:
	TNT1 A 0 A_GunFlash ("FlashIdleRegen", GFF_NOEXTCHANGE)
    SHRS A 1 A_WeaponReady (WRF_NOFIRE | WRF_NOBOB)
    TNT1 A 0 A_JumpIfInventory("RLMisfireSpamPreventionCooldown", 1, "MisfirePrevention")
    Goto Ready
	
  Deselect:
	TNT1 A 0
	TNT1 A 0 A_GiveInventory("RLDeselectionFunction",1)
	TNT1 A 0 A_TakeInventory("RLShredderShotgunSelected", 1)
	TNT1 A 0 A_GiveInventory("RLRarityTokenRemover", 1)
  DeselectLoop:
    TNT1 A 0 A_JumpIfInventory("RLShellshockPerk", 1, "DeselectRenegade")
	TNT1 A 0 A_GunFlash ("FlashIdle", GFF_NOEXTCHANGE)
    TNT1 A 0 A_Lower
    SHRS A 1 A_Lower
    Loop
  DeselectRenegade:
    TNT1 A 0 A_Lower
    loop
  SelectRenegade: 
    TNT1 A 0 A_Raise
    loop
  SelectSetWeapon:
	TNT1 A 0 A_GiveInventory("RLBasicAssemblyTypeWeapon", 1)
	TNT1 A 0 A_GiveInventory("RLShotgunTypeWeapon", 1)
	TNT1 A 0 A_GiveInventory("RLAssembledWeaponToken", 1)
	TNT1 A 0 A_GiveInventory("RLShredderShotgunSelected", 1)
    Goto SelectLoop
  SelectLoop:
    TNT1 A 0 A_JumpIfInventory("RLShellshockPerk", 1, "SelectRenegade")
	TNT1 A 0 A_GunFlash ("FlashIdle", GFF_NOEXTCHANGE)
    TNT1 A 0 A_Raise
    SHRS A 1 A_Raise
    Loop
	
//========  SPREAD =============================================================
	
  Fire:
	SHRS A 0 A_JumpIfInventory("RLRestrictionMeleeOnly",1,"MeleeRestricted") // Cannot fire in levels that restrict it
	SHRS A 0 A_JumpIfInventory("RLRestrictionSilencedOnly",1,"SilencedRestricted") // Cannot fire in levels that restrict it
	SHRS A 0 A_JumpIfInventory("RLRestrictionBoomOnly",1,"BoomRestricted") // Cannot fire in levels that restrict it
	SHRS A 0 A_JumpIfInventory("RLRestrictionHighTechOnly",1,"HighTechRestricted") // Cannot fire in levels that restrict it
	SHRS A 0 A_JumpIfInventory("RLRestrictionCunningOnly",1,"CunningRestricted") // Cannot fire in levels that restrict it
	
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunMode", 2, "FireShredder")
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunClip", 2, 1)
	Goto Reload
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunMode", 1, "FireSlug")
	TNT1 A 0 A_AlertMonsters
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunFirestormMod",1,"FireF")
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunSniperMod",1,"FireS")
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunPowerMod",1,"FireP")
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunAgilityMod",1,"FireA")
    TNT1 A 0 A_JumpIfInventory("RLShellshockPerk", 1, "FireRenegade")
	TNT1 A 0 A_FireBullets (12, 7.5, 20, 5, "RLBulletPuff", 0)
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunBulkMod",1,1)
    Goto FireFinish
	TNT1 A 0 A_FireBullets (12, 7.5, 2, 5, "RLBulletPuff", 0)
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunBulkMod",2,1)
    Goto FireFinish
	TNT1 A 0 A_FireBullets (12, 7.5, 2, 5, "RLBulletPuff", 0)
    Goto FireFinish
  FireRenegade:
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunBulkMod",2,4)
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunBulkMod",1,2)
	TNT1 A 0 A_FireBullets (12, 7.5, 30, 5, "RLBulletPuff", 0)
    Goto FireFinish
	TNT1 A 0 A_FireBullets (12, 7.5, 33, 5, "RLBulletPuff", 0)
    Goto FireFinish
	TNT1 A 0 A_FireBullets (12, 7.5, 36, 5, "RLBulletPuff", 0)
    Goto FireFinish
  FireP:
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunPowerMod",2,"FirePP")
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunAgilityMod",1,"FirePA")
    TNT1 A 0 A_JumpIfInventory("RLShellshockPerk", 1, "FireRenegadeP")
	TNT1 A 0 A_FireBullets (12, 7.5, 20, 6, "RLBulletPuff", 0)
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunBulkMod",1,1)
    Goto FireFinish
	TNT1 A 0 A_FireBullets (12, 7.5, 2, 6, "RLBulletPuff", 0)
    Goto FireFinish
  FireRenegadeP:
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunBulkMod",1,2)
	TNT1 A 0 A_FireBullets (12, 7.5, 30, 6, "RLBulletPuff", 0)
    Goto FireFinish
	TNT1 A 0 A_FireBullets (12, 7.5, 33, 6, "RLBulletPuff", 0)
    Goto FireFinish
  FireA:
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunPowerMod",1,"FirePA")
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunAgilityMod",2,"FireAA")
    TNT1 A 0 A_JumpIfInventory("RLShellshockPerk", 1, "FireRenegadeA")
	TNT1 A 0 A_FireBullets (11.5, 7, 20, 5, "RLBulletPuff", 0)
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunBulkMod",1,1)
    Goto FireFinish
	TNT1 A 0 A_FireBullets (11.5, 7, 2, 5, "RLBulletPuff", 0)
    Goto FireFinish
  FireRenegadeA:
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunBulkMod",1,2)
	TNT1 A 0 A_FireBullets (11.5, 7, 30, 5, "RLBulletPuff", 0)
    Goto FireFinish
	TNT1 A 0 A_FireBullets (11.5, 7, 33, 5, "RLBulletPuff", 0)
    Goto FireFinish
  FirePP:
    TNT1 A 0 A_JumpIfInventory("RLShellshockPerk", 1, "FireRenegadePP")
	TNT1 A 0 A_FireBullets (12, 7.5, 20, 7, "RLBulletPuff", 0)
    Goto FireFinish
  FireRenegadePP:
	TNT1 A 0 A_FireBullets (12, 7.5, 30, 7, "RLBulletPuff", 0)
    Goto FireFinish
  FirePA:
    TNT1 A 0 A_JumpIfInventory("RLShellshockPerk", 1, "FireRenegadePA")
	TNT1 A 0 A_FireBullets (11.5, 7, 20, 6, "RLBulletPuff", 0)
    Goto FireFinish
  FireRenegadePA:
	TNT1 A 0 A_FireBullets (11.5, 7, 30, 6, "RLBulletPuff", 0)
    Goto FireFinish
  FireAA:
    TNT1 A 0 A_JumpIfInventory("RLShellshockPerk", 1, "FireRenegadeAA")
	TNT1 A 0 A_FireBullets (11, 6.5, 20, 5, "RLBulletPuff", 0)
    Goto FireFinish
  FireRenegadeAA:
	TNT1 A 0 A_FireBullets (11, 6.5, 30, 5, "RLBulletPuff", 0)
    Goto FireFinish
  FireS:
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunSniperMod",2,"FireSS")
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunPowerMod",1,"FireSP")
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunAgilityMod",1,"FireSA")
    TNT1 A 0 A_JumpIfInventory("RLShellshockPerk", 1, "FireRenegadeS")
	TNT1 A 0 A_FireBullets (10, 5.5, 19, 5, "RLBulletPuff", 0)
	TNT1 A 0 A_FireBullets (0, 0, 1, 5, "RLBulletPuff", 0)
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunBulkMod",1,1)
    Goto FireFinish
	TNT1 A 0 A_FireBullets (10, 5.5, 2, 5, "RLBulletPuff", 0)
    Goto FireFinish
  FireRenegadeS:
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunBulkMod",1,3)
	TNT1 A 0 A_FireBullets (10, 5.5, 29, 5, "RLBulletPuff", 0)
	TNT1 A 0 A_FireBullets (0, 0, 1, 5, "RLBulletPuff", 0)
    Goto FireFinish
	TNT1 A 0 A_FireBullets (10, 5.5, 32, 5, "RLBulletPuff", 0)
	TNT1 A 0 A_FireBullets (0, 0, 1, 5, "RLBulletPuff", 0)
    Goto FireFinish
  FireSS:
    TNT1 A 0 A_JumpIfInventory("RLShellshockPerk", 1, "FireRenegadeSS")
	TNT1 A 0 A_FireBullets (0, 0, 20, 5, "RLBulletPuff", 0)
    Goto FireFinish
  FireRenegadeSS:
	TNT1 A 0 A_FireBullets (0, 0, 30, 5, "RLBulletPuff", 0)
    Goto FireFinish
  FireSP:
    TNT1 A 0 A_JumpIfInventory("RLShellshockPerk", 1, "FireRenegadeSP")
	TNT1 A 0 A_FireBullets (10, 5.5, 19, 6, "RLBulletPuff", 0)
	TNT1 A 0 A_FireBullets (0, 0, 1, 6, "RLBulletPuff", 0)
    Goto FireFinish
  FireRenegadeSP:
	TNT1 A 0 A_FireBullets (10, 5.5, 29, 6, "RLBulletPuff", 0)
	TNT1 A 0 A_FireBullets (0, 0, 1, 6, "RLBulletPuff", 0)
    Goto FireFinish
  FireSA:
    TNT1 A 0 A_JumpIfInventory("RLShellshockPerk", 1, "FireRenegadeSA")
	TNT1 A 0 A_FireBullets (9.5, 5, 19, 5, "RLBulletPuff", 0)
	TNT1 A 0 A_FireBullets (0, 0, 1, 5, "RLBulletPuff", 0)
    Goto FireFinish
  FireRenegadeSA:
	TNT1 A 0 A_FireBullets (9.5, 5, 29, 5, "RLBulletPuff", 0)
	TNT1 A 0 A_FireBullets (0, 0, 1, 5, "RLBulletPuff", 0)
    Goto FireFinish
  FireF:
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunFirestormMod",2,"FireFF")
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunSniperMod",1,"FireFS")
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunPowerMod",1,"FireFP")
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunAgilityMod",1,"FireFA")
    TNT1 A 0 A_JumpIfInventory("RLShellshockPerk", 1, "FireRenegadeF")
	TNT1 A 0 A_FireBullets (0, 0, 1, 25, "RLShotgunPuffCloseRange", FBF_NORANDOM, 96)
	TNT1 A 0 A_FireBullets (12, 7.5, 20, 5, "RLShotgunPuffF", 0)
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunBulkMod",1,1)
    Goto FireFinish
	TNT1 A 0 A_FireBullets (12, 7.5, 2, 5, "RLShotgunPuffF", 0)
    Goto FireFinish
  FireRenegadeF:
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunBulkMod",1,3)
	TNT1 A 0 A_FireBullets (0, 0, 1, 25, "RLShotgunPuffCloseRange", FBF_NORANDOM, 96)
	TNT1 A 0 A_FireBullets (12, 7.5, 30, 5, "RLShotgunPuffF", 0)
    Goto FireFinish
	TNT1 A 0 A_FireBullets (0, 0, 1, 25, "RLShotgunPuffCloseRange", FBF_NORANDOM, 96)
	TNT1 A 0 A_FireBullets (12, 7.5, 33, 5, "RLShotgunPuffF", 0)
    Goto FireFinish
  FireFF:
    TNT1 A 0 A_JumpIfInventory("RLShellshockPerk", 1, "FireRenegadeFF")
	TNT1 A 0 A_FireBullets (0, 0, 1, 50, "RLShotgunPuffCloseRange", FBF_NORANDOM, 128)
	TNT1 A 0 A_FireBullets (12, 7.5, 20, 5, "RLShotgunPuffFF", 0)
    Goto FireFinish
  FireRenegadeFF:
	TNT1 A 0 A_FireBullets (0, 0, 1, 50, "RLShotgunPuffCloseRange", FBF_NORANDOM, 128)
	TNT1 A 0 A_FireBullets (12, 7.5, 30, 5, "RLShotgunPuffFF", 0)
    Goto FireFinish
  FireFP:
    TNT1 A 0 A_JumpIfInventory("RLShellshockPerk", 1, "FireRenegadeFP")
	TNT1 A 0 A_FireBullets (0, 0, 1, 30, "RLShotgunPuffCloseRange", FBF_NORANDOM, 96)
	TNT1 A 0 A_FireBullets (12, 7.5, 20, 6, "RLShotgunPuffF", 0)
    Goto FireFinish
  FireRenegadeFP:
	TNT1 A 0 A_FireBullets (0, 0, 1, 30, "RLShotgunPuffCloseRange", FBF_NORANDOM, 96)
	TNT1 A 0 A_FireBullets (12, 7.5, 20, 6, "RLShotgunPuffF", 0)
    Goto FireFinish
  FireFA:
    TNT1 A 0 A_JumpIfInventory("RLShellshockPerk", 1, "FireRenegadeFA")
	TNT1 A 0 A_FireBullets (0, 0, 1, 30, "RLShotgunPuffCloseRange", FBF_NORANDOM, 96)
	TNT1 A 0 A_FireBullets (11.5, 7, 20, 5, "RLShotgunPuffF", 0)
    Goto FireFinish
  FireRenegadeFA:
	TNT1 A 0 A_FireBullets (0, 0, 1, 30, "RLShotgunPuffCloseRange", FBF_NORANDOM, 96)
	TNT1 A 0 A_FireBullets (11.5, 7, 30, 5, "RLShotgunPuffF", 0)
    Goto FireFinish
  FireFS:
    TNT1 A 0 A_JumpIfInventory("RLShellshockPerk", 1, "FireRenegadeFS")
	TNT1 A 0 A_FireBullets (0, 0, 1, 25, "RLShotgunPuffCloseRange", FBF_NORANDOM, 96)
	TNT1 A 0 A_FireBullets (10, 5.5, 19, 5, "RLShotgunPuffF", 0)
	TNT1 A 0 A_FireBullets (0, 0, 1, 5, "RLShotgunPuffF", 0)
    Goto FireFinish
  FireRenegadeFS:
	TNT1 A 0 A_FireBullets (0, 0, 1, 25, "RLShotgunPuffCloseRange", FBF_NORANDOM, 96)
	TNT1 A 0 A_FireBullets (10, 5.5, 29, 5, "RLShotgunPuffF", 0)
	TNT1 A 0 A_FireBullets (0, 0, 1, 5, "RLShotgunPuffF", 0)
    Goto FireFinish
	
  FireFinish:
    TNT1 A 0 A_SpawnItemEx ("RLDoubleShotgunRecoil", 0,0,0, 0,0,0, 0, SXF_NOCHECKPOSITION | SXF_SETMASTER) // Pitch-based recoil
    TNT1 A 0 A_JumpIfInventory ("RLRenegadeExtraShot", 1, 3)
	TNT1 A 0 A_TakeInventory("RLShredderShotgunClip", 2)
	TNT1 A 0 A_TakeInventory("RLShredderShotgunShredderClip", 20)
    TNT1 A 0 A_TakeInventory ("RLRenegadeExtraShot", 1)
    TNT1 A 0 A_PlaySound("weapons/shreddershotgun", CHAN_WEAPON, 1, 0, 0.6)
    TNT1 A 0 A_PlaySound("weapons/shreddershotgun", 7, 0.05, 0, 0.20)
    SHRS B 2 Bright A_GunFlash
    SHRS C 2 Bright
    SHRS DEA 1
	TNT1 A 0 A_JumpIf(CallACS("DRLA_AutoReload"), "Reload")
    Goto Ready
	
//========  SLUG ===============================================================
	
  FireSlug:
	TNT1 A 0 A_AlertMonsters
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunFirestormMod",1,"FireSlugF")
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunSniperMod",1,"FireSlugS")
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunPowerMod",1,"FireSlugP")
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunAgilityMod",1,"FireSlugA")
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunBulkMod",1,5)
	TNT1 A 0 A_FireBullets (frandom(0.8,1.4), frandom(-0.4,0.4), -1, random(50,150), "RLBulletPuff", FBF_NORANDOM | FBF_EXPLICITANGLE)
	TNT1 A 0 A_FireBullets (frandom(-1.4,-0.8), frandom(-0.4,0.4), -1, random(50,150), "RLBulletPuff", FBF_NORANDOM | FBF_EXPLICITANGLE)
    TNT1 A 0 A_JumpIfInventory("RLShellshockPerk", 1, 1)
    Goto FireFinish
	TNT1 A 0 A_FireBullets (frandom(-0.8,0.8), frandom(-0.4,0.4), -1, random(50,150), "RLBulletPuff", FBF_NORANDOM | FBF_EXPLICITANGLE)
    Goto FireFinish
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunBulkMod",2,5)
	TNT1 A 0 A_FireBullets (frandom(0.8,1.4), frandom(-0.4,0.4), -1, random(75,150), "RLBulletPuff", FBF_NORANDOM | FBF_EXPLICITANGLE)
	TNT1 A 0 A_FireBullets (frandom(-1.4,-0.8), frandom(-0.4,0.4), -1, random(75,150), "RLBulletPuff", FBF_NORANDOM | FBF_EXPLICITANGLE)
    TNT1 A 0 A_JumpIfInventory("RLShellshockPerk", 1, 1)
    Goto FireFinish
	TNT1 A 0 A_FireBullets (frandom(-0.8,0.8), frandom(-0.4,0.4), -1, random(75,150), "RLBulletPuff", FBF_NORANDOM | FBF_EXPLICITANGLE)
    Goto FireFinish
	TNT1 A 0 A_FireBullets (frandom(0.8,1.4), frandom(-0.4,0.4), -1, random(100,150), "RLBulletPuff", FBF_NORANDOM | FBF_EXPLICITANGLE)
	TNT1 A 0 A_FireBullets (frandom(-1.4,-0.8), frandom(-0.4,0.4), -1, random(100,150), "RLBulletPuff", FBF_NORANDOM | FBF_EXPLICITANGLE)
    TNT1 A 0 A_JumpIfInventory("RLShellshockPerk", 1, 1)
    Goto FireFinish
	TNT1 A 0 A_FireBullets (frandom(-0.8,0.8), frandom(-0.4,0.4), -1, random(100,150), "RLBulletPuff", FBF_NORANDOM | FBF_EXPLICITANGLE)
    Goto FireFinish
  FireSlugP:
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunPowerMod",2,"FireSlugPP")
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunAgilityMod",1,"FireSlugPA")
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunBulkMod",1,5)
	TNT1 A 0 A_FireBullets (frandom(0.8,1.4), frandom(-0.4,0.4), -1, random(50,175), "RLBulletPuff", FBF_NORANDOM | FBF_EXPLICITANGLE)
	TNT1 A 0 A_FireBullets (frandom(-1.4,-0.8), frandom(-0.4,0.4), -1, random(50,175), "RLBulletPuff", FBF_NORANDOM | FBF_EXPLICITANGLE)
    TNT1 A 0 A_JumpIfInventory("RLShellshockPerk", 1, 1)
    Goto FireFinish
	TNT1 A 0 A_FireBullets (frandom(-0.8,0.8), frandom(-0.4,0.4), -1, random(50,175), "RLBulletPuff", FBF_NORANDOM | FBF_EXPLICITANGLE)
    Goto FireFinish
	TNT1 A 0 A_FireBullets (frandom(0.8,1.4), frandom(-0.4,0.4), -1, random(75,175), "RLBulletPuff", FBF_NORANDOM | FBF_EXPLICITANGLE)
	TNT1 A 0 A_FireBullets (frandom(-1.4,-0.8), frandom(-0.4,0.4), -1, random(75,175), "RLBulletPuff", FBF_NORANDOM | FBF_EXPLICITANGLE)
    TNT1 A 0 A_JumpIfInventory("RLShellshockPerk", 1, 1)
    Goto FireFinish
	TNT1 A 0 A_FireBullets (frandom(-0.8,0.8), frandom(-0.4,0.4), -1, random(50,175), "RLBulletPuff", FBF_NORANDOM | FBF_EXPLICITANGLE)
    Goto FireFinish
  FireSlugA:
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunPowerMod",1,"FireSlugPA")
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunAgilityMod",2,"FireSlugAA")
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunBulkMod",1,5)
	TNT1 A 0 A_FireBullets (frandom(1.0,1.2), frandom(-0.2,0.2), -1, random(50,150), "RLBulletPuff", FBF_NORANDOM | FBF_EXPLICITANGLE)
	TNT1 A 0 A_FireBullets (frandom(-1.2,-1.0), frandom(-0.2,0.2), -1, random(50,150), "RLBulletPuff", FBF_NORANDOM | FBF_EXPLICITANGLE)
    TNT1 A 0 A_JumpIfInventory("RLShellshockPerk", 1, 1)
    Goto FireFinish
	TNT1 A 0 A_FireBullets (frandom(-0.6,0.6), frandom(-0.2,0.2), -1, random(50,150), "RLBulletPuff", FBF_NORANDOM | FBF_EXPLICITANGLE)
    Goto FireFinish
	TNT1 A 0 A_FireBullets (frandom(1.0,1.2), frandom(-0.2,0.2), -1, random(75,150), "RLBulletPuff", FBF_NORANDOM | FBF_EXPLICITANGLE)
	TNT1 A 0 A_FireBullets (frandom(-1.2,-1.0), frandom(-0.2,0.2), -1, random(75,150), "RLBulletPuff", FBF_NORANDOM | FBF_EXPLICITANGLE)
    TNT1 A 0 A_JumpIfInventory("RLShellshockPerk", 1, 1)
    Goto FireFinish
	TNT1 A 0 A_FireBullets (frandom(-0.6,0.6), frandom(-0.2,0.2), -1, random(75,150), "RLBulletPuff", FBF_NORANDOM | FBF_EXPLICITANGLE)
    Goto FireFinish
  FireSlugPP:
	TNT1 A 0 A_FireBullets (frandom(0.8,1.4), frandom(-0.4,0.4), -1, random(50,200), "RLBulletPuff", FBF_NORANDOM | FBF_EXPLICITANGLE)
	TNT1 A 0 A_FireBullets (frandom(-1.4,-0.8), frandom(-0.4,0.4), -1, random(50,200), "RLBulletPuff", FBF_NORANDOM | FBF_EXPLICITANGLE)
    TNT1 A 0 A_JumpIfInventory("RLShellshockPerk", 1, 1)
    Goto FireFinish
	TNT1 A 0 A_FireBullets (frandom(-0.8,0.8), frandom(-0.4,0.4), -1, random(50,200), "RLBulletPuff", FBF_NORANDOM | FBF_EXPLICITANGLE)
    Goto FireFinish
  FireSlugPA:
	TNT1 A 0 A_FireBullets (frandom(1.0,1.2), frandom(-0.2,0.2), -1, random(50,175), "RLBulletPuff", FBF_NORANDOM | FBF_EXPLICITANGLE)
	TNT1 A 0 A_FireBullets (frandom(-1.2,-1.0), frandom(-0.2,0.2), -1, random(50,175), "RLBulletPuff", FBF_NORANDOM | FBF_EXPLICITANGLE)
    TNT1 A 0 A_JumpIfInventory("RLShellshockPerk", 1, 1)
    Goto FireFinish
	TNT1 A 0 A_FireBullets (frandom(-0.6,0.6), frandom(-0.2,0.2), -1, random(50,175), "RLBulletPuff", FBF_NORANDOM | FBF_EXPLICITANGLE)
    Goto FireFinish
  FireSlugAA:
	TNT1 A 0 A_FireBullets (frandom(1.0,1.0), 0, -1, random(50,150), "RLBulletPuff", FBF_NORANDOM | FBF_EXPLICITANGLE)
	TNT1 A 0 A_FireBullets (frandom(-1.0,-1.0), 0, -1, random(50,150), "RLBulletPuff", FBF_NORANDOM | FBF_EXPLICITANGLE)
    TNT1 A 0 A_JumpIfInventory("RLShellshockPerk", 1, 1)
    Goto FireFinish
	TNT1 A 0 A_FireBullets (frandom(-0.4,0.4), 0, -1, random(50,150), "RLBulletPuff", FBF_NORANDOM | FBF_EXPLICITANGLE)
    Goto FireFinish
  FireSlugS:
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunSniperMod",2,"FireSlugSS")
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunPowerMod",1,"FireSlugSP")
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunAgilityMod",1,"FireSlugSA")
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunBulkMod",1,5)
	TNT1 A 0 A_FireBullets (1.0, 0, -1, random(50,150), "RLBulletPuff", FBF_NORANDOM | FBF_EXPLICITANGLE)
	TNT1 A 0 A_FireBullets (-1.0, 0, -1, random(50,150), "RLBulletPuff", FBF_NORANDOM | FBF_EXPLICITANGLE)
    TNT1 A 0 A_JumpIfInventory("RLShellshockPerk", 1, 1)
    Goto FireFinish
	TNT1 A 0 A_FireBullets (0, 0, -1, random(50,150), "RLBulletPuff", FBF_NORANDOM | FBF_EXPLICITANGLE)
    Goto FireFinish
	TNT1 A 0 A_FireBullets (1.0, 0, -1, random(75,150), "RLBulletPuff", FBF_NORANDOM | FBF_EXPLICITANGLE)
	TNT1 A 0 A_FireBullets (-1.0, 0, -1, random(75,150), "RLBulletPuff", FBF_NORANDOM | FBF_EXPLICITANGLE)
    TNT1 A 0 A_JumpIfInventory("RLShellshockPerk", 1, 1)
    Goto FireFinish
	TNT1 A 0 A_FireBullets (0, 0, -1, random(75,150), "RLBulletPuff", FBF_NORANDOM | FBF_EXPLICITANGLE)
    Goto FireFinish
  FireSlugSS:
	TNT1 A 0 A_FireBullets (0, 0, -1, random(50,150), "RLBulletPuff", FBF_NORANDOM | FBF_EXPLICITANGLE)
	TNT1 A 0 A_FireBullets (0, 0, -1, random(50,150), "RLBulletPuff", FBF_NORANDOM | FBF_EXPLICITANGLE)
    TNT1 A 0 A_JumpIfInventory("RLShellshockPerk", 1, 1)
    Goto FireFinish
	TNT1 A 0 A_FireBullets (0, 0, -1, random(50,150), "RLBulletPuff", FBF_NORANDOM | FBF_EXPLICITANGLE)
    Goto FireFinish
  FireSlugSP:
	TNT1 A 0 A_FireBullets (1.0, 0, -1, random(50,175), "RLBulletPuff", FBF_NORANDOM | FBF_EXPLICITANGLE)
	TNT1 A 0 A_FireBullets (-1.0, 0, -1, random(50,175), "RLBulletPuff", FBF_NORANDOM | FBF_EXPLICITANGLE)
    TNT1 A 0 A_JumpIfInventory("RLShellshockPerk", 1, 1)
    Goto FireFinish
	TNT1 A 0 A_FireBullets (0, 0, -1, random(50,175), "RLBulletPuff", FBF_NORANDOM | FBF_EXPLICITANGLE)
    Goto FireFinish
  FireSlugSA:
	TNT1 A 0 A_FireBullets (1.0, 0, -1, random(50,150), "RLBulletPuff", FBF_NORANDOM | FBF_EXPLICITANGLE)
	TNT1 A 0 A_FireBullets (-1.0, 0, -1, random(50,150), "RLBulletPuff", FBF_NORANDOM | FBF_EXPLICITANGLE)
    TNT1 A 0 A_JumpIfInventory("RLShellshockPerk", 1, 1)
    Goto FireFinish
	TNT1 A 0 A_FireBullets (0, 0, -1, random(50,150), "RLBulletPuff", FBF_NORANDOM | FBF_EXPLICITANGLE)
    Goto FireFinish
  FireSlugF:
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunFirestormMod",2,"FireSlugFF")
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunSniperMod",1,"FireSlugFS")
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunPowerMod",1,"FireSlugFP")
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunAgilityMod",1,"FireSlugFA")
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunBulkMod",1,6)
	TNT1 A 0 A_FireBullets (0, 0, 1, 30, "RLShotgunPuffCloseRange", FBF_NORANDOM, 96)
	TNT1 A 0 A_FireBullets (frandom(0.8,1.4), frandom(-0.4,0.4), -1, random(50,150), "RLShotgunPuffF", FBF_NORANDOM | FBF_EXPLICITANGLE)
	TNT1 A 0 A_FireBullets (frandom(-1.4,-0.8), frandom(-0.4,0.4), -1, random(50,150), "RLShotgunPuffF", FBF_NORANDOM | FBF_EXPLICITANGLE)
    TNT1 A 0 A_JumpIfInventory("RLShellshockPerk", 1, 1)
    Goto FireFinish
	TNT1 A 0 A_FireBullets (frandom(-0.8,0.8), frandom(-0.4,0.4), -1, random(50,150), "RLShotgunPuffF", FBF_NORANDOM | FBF_EXPLICITANGLE)
    Goto FireFinish
	TNT1 A 0 A_FireBullets (0, 0, 1, 30, "RLShotgunPuffCloseRange", FBF_NORANDOM, 96)
	TNT1 A 0 A_FireBullets (frandom(0.8,1.4), frandom(-0.4,0.4), -1, random(75,150), "RLShotgunPuffF", FBF_NORANDOM | FBF_EXPLICITANGLE)
	TNT1 A 0 A_FireBullets (frandom(-1.4,-0.8), frandom(-0.4,0.4), -1, random(75,150), "RLShotgunPuffF", FBF_NORANDOM | FBF_EXPLICITANGLE)
    TNT1 A 0 A_JumpIfInventory("RLShellshockPerk", 1, 1)
    Goto FireFinish
	TNT1 A 0 A_FireBullets (frandom(-0.8,0.8), frandom(-0.4,0.4), -1, random(75,150), "RLShotgunPuffF", FBF_NORANDOM | FBF_EXPLICITANGLE)
    Goto FireFinish
  FireSlugFF:
	TNT1 A 0 A_FireBullets (0, 0, 1, 60, "RLShotgunPuffCloseRange", FBF_NORANDOM, 128)
	TNT1 A 0 A_FireBullets (frandom(0.8,1.4), frandom(-0.4,0.4), -1, random(50,150), "RLShotgunPuffFF", FBF_NORANDOM | FBF_EXPLICITANGLE)
	TNT1 A 0 A_FireBullets (frandom(-1.4,-0.8), frandom(-0.4,0.4), -1, random(50,150), "RLShotgunPuffFF", FBF_NORANDOM | FBF_EXPLICITANGLE)
    TNT1 A 0 A_JumpIfInventory("RLShellshockPerk", 1, 1)
    Goto FireFinish
	TNT1 A 0 A_FireBullets (frandom(-0.8,0.8), frandom(-0.4,0.4), -1, random(50,150), "RLShotgunPuffFF", FBF_NORANDOM | FBF_EXPLICITANGLE)
    Goto FireFinish
  FireSlugFP:
	TNT1 A 0 A_FireBullets (0, 0, 1, 30, "RLShotgunPuffCloseRange", FBF_NORANDOM, 96)
	TNT1 A 0 A_FireBullets (frandom(0.8,1.4), frandom(-0.4,0.4), -1, random(50,175), "RLShotgunPuffF", FBF_NORANDOM | FBF_EXPLICITANGLE)
	TNT1 A 0 A_FireBullets (frandom(-1.4,-0.8), frandom(-0.4,0.4), -1, random(50,175), "RLShotgunPuffF", FBF_NORANDOM | FBF_EXPLICITANGLE)
    TNT1 A 0 A_JumpIfInventory("RLShellshockPerk", 1, 1)
    Goto FireFinish
	TNT1 A 0 A_FireBullets (frandom(-0.8,0.8), frandom(-0.4,0.4), -1, random(50,175), "RLShotgunPuffF", FBF_NORANDOM | FBF_EXPLICITANGLE)
    Goto FireFinish
  FireSlugFA:
	TNT1 A 0 A_FireBullets (0, 0, 1, 30, "RLShotgunPuffCloseRange", FBF_NORANDOM, 96)
	TNT1 A 0 A_FireBullets (frandom(1.0,1.2), frandom(-0.2,0.2), -1, random(50,150), "RLShotgunPuffF", FBF_NORANDOM | FBF_EXPLICITANGLE)
	TNT1 A 0 A_FireBullets (frandom(-1.2,-1.0), frandom(-0.2,0.2), -1, random(50,150), "RLShotgunPuffF", FBF_NORANDOM | FBF_EXPLICITANGLE)
    TNT1 A 0 A_JumpIfInventory("RLShellshockPerk", 1, 1)
    Goto FireFinish
	TNT1 A 0 A_FireBullets (frandom(-0.6,0.6), frandom(-0.2,0.2), -1, random(50,150), "RLShotgunPuffF", FBF_NORANDOM | FBF_EXPLICITANGLE)
    Goto FireFinish
  FireSlugFS:
	TNT1 A 0 A_FireBullets (0, 0, 1, 30, "RLShotgunPuffCloseRange", FBF_NORANDOM, 96)
	TNT1 A 0 A_FireBullets (1.0, 0, -1, random(50,150), "RLShotgunPuffF", FBF_NORANDOM | FBF_EXPLICITANGLE)
	TNT1 A 0 A_FireBullets (-1.0, 0, -1, random(50,150), "RLShotgunPuffF", FBF_NORANDOM | FBF_EXPLICITANGLE)
    TNT1 A 0 A_JumpIfInventory("RLShellshockPerk", 1, 1)
    Goto FireFinish
	TNT1 A 0 A_FireBullets (0, 0, -1, random(50,150), "RLShotgunPuffF", FBF_NORANDOM | FBF_EXPLICITANGLE)
    Goto FireFinish
	
//========  SHREDDER ===========================================================
	
  FireShredder:
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunShredderClip", 2, 1)
	Goto Reload
	TNT1 A 0 A_TakeInventory("RLShredderShotgunClip", 2)
	TNT1 A 0 A_AlertMonsters
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunFirestormMod",1,"FireShredderF")
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunSniperMod",1,"FireShredderS")
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunPowerMod",1,"FireShredderP")
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunAgilityMod",1,"FireShredderA")
	TNT1 A 0 A_FireBullets (5, 4, 2, 5, "RLBulletPuff", 0)
    TNT1 A 0 A_JumpIfInventory("RLShellshockPerk", 1, 1)
    Goto FireFinishShredder
	TNT1 A 0 A_FireBullets (5, 4, -1, 5, "RLBulletPuff", 0)
    Goto FireFinishShredder
  FireShredderP:
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunPowerMod",2,"FireShredderPP")
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunAgilityMod",1,"FireShredderPA")
	TNT1 A 0 A_FireBullets (5, 4, 2, 6, "RLBulletPuff", 0)
    TNT1 A 0 A_JumpIfInventory("RLShellshockPerk", 1, 1)
    Goto FireFinishShredder
	TNT1 A 0 A_FireBullets (5, 4, -1, 6, "RLBulletPuff", 0)
    Goto FireFinishShredder
  FireShredderA:
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunPowerMod",1,"FireShredderPA")
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunAgilityMod",2,"FireShredderAA")
	TNT1 A 0 A_FireBullets (4.5, 3.5, 2, 5, "RLBulletPuff", 0)
    TNT1 A 0 A_JumpIfInventory("RLShellshockPerk", 1, 1)
    Goto FireFinishShredder
	TNT1 A 0 A_FireBullets (4.5, 3.5, -1, 5, "RLBulletPuff", 0)
    Goto FireFinishShredder
  FireShredderPP:
	TNT1 A 0 A_FireBullets (5, 4, 2, 7, "RLBulletPuff", 0)
    TNT1 A 0 A_JumpIfInventory("RLShellshockPerk", 1, 1)
    Goto FireFinishShredder
	TNT1 A 0 A_FireBullets (5, 4, -1, 7, "RLBulletPuff", 0)
    Goto FireFinishShredder
  FireShredderPA:
	TNT1 A 0 A_FireBullets (4.5, 3.5, 2, 6, "RLBulletPuff", 0)
    TNT1 A 0 A_JumpIfInventory("RLShellshockPerk", 1, 1)
    Goto FireFinishShredder
	TNT1 A 0 A_FireBullets (4.5, 3.5, -1, 6, "RLBulletPuff", 0)
    Goto FireFinishShredder
  FireShredderAA:
	TNT1 A 0 A_FireBullets (4, 3, 2, 5, "RLBulletPuff", 0)
    TNT1 A 0 A_JumpIfInventory("RLShellshockPerk", 1, 1)
    Goto FireFinishShredder
	TNT1 A 0 A_FireBullets (4, 3, -1, 5, "RLBulletPuff", 0)
    Goto FireFinishShredder
  FireShredderS:
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunSniperMod",2,"FireShredderSS")
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunPowerMod",1,"FireShredderSP")
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunAgilityMod",1,"FireShredderSA")
	TNT1 A 0 A_FireBullets (3, 2, 2, 5, "RLBulletPuff", 0)
    TNT1 A 0 A_JumpIfInventory("RLShellshockPerk", 1, 1)
    Goto FireFinishShredder
	TNT1 A 0 A_FireBullets (3, 2, -1, 5, "RLBulletPuff", 0)
    Goto FireFinishShredder
  FireShredderSS:
	TNT1 A 0 A_FireBullets (0, 0, 2, 5, "RLBulletPuff", 0)
    TNT1 A 0 A_JumpIfInventory("RLShellshockPerk", 1, 1)
    Goto FireFinishShredder
	TNT1 A 0 A_FireBullets (0, 0, -1, 5, "RLBulletPuff", 0)
    Goto FireFinishShredder
  FireShredderSP:
	TNT1 A 0 A_FireBullets (3, 2, 2, 6, "RLBulletPuff", 0)
    TNT1 A 0 A_JumpIfInventory("RLShellshockPerk", 1, 1)
    Goto FireFinishShredder
	TNT1 A 0 A_FireBullets (3, 2, -1, 6, "RLBulletPuff", 0)
    Goto FireFinishShredder
  FireShredderSA:
	TNT1 A 0 A_FireBullets (2.5, 1.5, 2, 5, "RLBulletPuff", 0)
    TNT1 A 0 A_JumpIfInventory("RLShellshockPerk", 1, 1)
    Goto FireFinishShredder
	TNT1 A 0 A_FireBullets (2.5, 1.5, -1, 5, "RLBulletPuff", 0)
    Goto FireFinishShredder
  FireShredderF:
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunFirestormMod",2,"FireShredderFF")
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunSniperMod",1,"FireShredderFS")
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunPowerMod",1,"FireShredderFP")
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunAgilityMod",1,"FireShredderFA")
	TNT1 A 0 A_FireBullets (5, 4, 2, 5, "RLShotgunPuffF", 0)
    TNT1 A 0 A_JumpIfInventory("RLShellshockPerk", 1, 1)
    Goto FireFinishShredder
	TNT1 A 0 A_FireBullets (5, 4, -1, 5, "RLShotgunPuffF", 0)
    Goto FireFinishShredder
  FireShredderFF:
	TNT1 A 0 A_FireBullets (5, 4, 2, 5, "RLShotgunPuffFF", 0)
    TNT1 A 0 A_JumpIfInventory("RLShellshockPerk", 1, 1)
    Goto FireFinishShredder
	TNT1 A 0 A_FireBullets (5, 4, -1, 5, "RLShotgunPuffFF", 0)
    Goto FireFinishShredder
  FireShredderFP:
	TNT1 A 0 A_FireBullets (5, 4, 2, 6, "RLShotgunPuffF", 0)
    TNT1 A 0 A_JumpIfInventory("RLShellshockPerk", 1, 1)
    Goto FireFinishShredder
	TNT1 A 0 A_FireBullets (5, 4, -1, 6, "RLShotgunPuffF", 0)
    Goto FireFinishShredder
  FireShredderFA:
	TNT1 A 0 A_FireBullets (4.5, 3.5, 2, 5, "RLShotgunPuffF", 0)
    TNT1 A 0 A_JumpIfInventory("RLShellshockPerk", 1, 1)
    Goto FireFinishShredder
	TNT1 A 0 A_FireBullets (4.5, 3.5, -1, 5, "RLShotgunPuffF", 0)
    Goto FireFinishShredder
  FireShredderFS:
	TNT1 A 0 A_FireBullets (3, 2, 2, 5, "RLShotgunPuffF", 0)
    TNT1 A 0 A_JumpIfInventory("RLShellshockPerk", 1, 1)
    Goto FireFinishShredder
	TNT1 A 0 A_FireBullets (3, 2, -1, 5, "RLShotgunPuffF", 0)
    Goto FireFinishShredder
  FireFinishShredder:
    TNT1 A 0 A_SpawnItemEx ("RLMinigunRecoil", 0,0,0, 0,0,0, 0, SXF_NOCHECKPOSITION | SXF_SETMASTER) // Pitch-based recoil
	TNT1 A 0 A_TakeInventory("RLShredderShotgunShredderClip", 2)
    TNT1 A 0 A_PlaySound("weapons/shreddershotgunshred", CHAN_WEAPON, 1, 0, 0.7)
    TNT1 A 0 A_PlaySound("weapons/shreddershotgunshred", 7, 0.05, 0, 0.20)
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunState",1,"FireFinishShredder1")
	TNT1 A 0 A_GiveInventory("RLShredderShotgunState",1)
    SHRS Y 1 Bright A_GunFlash ("FlashShredder1")
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunFirestormMod",1,2)
    SHRS Y 1 Bright
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunShredderClip",2,"FireShredder") // Keeps firing
    TNT1 A 0 A_JumpIfInventory ("RLRenegadeExtraShot", 1, 2)
    TNT1 A 0 A_Jump (256, 3)
	TNT1 A 0 A_GiveInventory("RLShredderShotgunShredderClip", 20)
    TNT1 A 0 A_TakeInventory ("RLRenegadeExtraShot", 1)
	Goto FireShredder
	TNT1 A 0 A_GunFlash ("FlashShredderFinish", GFF_NOEXTCHANGE)
    SHRS EA 1
	TNT1 A 0 A_JumpIf(CallACS("DRLA_AutoReload"), "Reload")
    Goto Ready
  FireFinishShredder1:
	TNT1 A 0 A_TakeInventory("RLShredderShotgunState",1)
    SHRS Z 1 Bright A_GunFlash ("FlashShredder2")
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunFirestormMod",1,2)
    SHRS Z 1 Bright
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunShredderClip",2,"FireShredder") // Keeps firing
    TNT1 A 0 A_JumpIfInventory ("RLRenegadeExtraShot", 1, 2)
    TNT1 A 0 A_Jump (256, 3)
	TNT1 A 0 A_GiveInventory("RLShredderShotgunShredderClip", 20)
    TNT1 A 0 A_TakeInventory ("RLRenegadeExtraShot", 1)
	Goto FireShredder
	TNT1 A 0 A_GunFlash ("FlashShredderFinish", GFF_NOEXTCHANGE)
    SHRS AFA 1
	TNT1 A 0 A_JumpIf(CallACS("DRLA_AutoReload"), "Reload")
    Goto Ready
	
//========  RELOAD =============================================================

  Reload:
	TNT1 A 0 A_JumpIfInventory("Shell",2,1)
	Goto Ready
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunClip",2,"Ready")
	TNT1 A 0 A_GunFlash ("FlashIdle", GFF_NOEXTCHANGE)
	SHRS A 1 A_WeaponReady (WRF_NOPRIMARY | WRF_ALLOWZOOM)
	TNT1 A 0 // Play the reload animation.
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunTechnicalMod",2,"Reload2")
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunTechnicalMod",1,"Reload1")
	TNT1 A 0 A_GunFlash ("FlashReload1", GFF_NOEXTCHANGE)
    SHRS F 2
    SHRS G 2
    SHRS H 2
    SHRS I 2
    SHRS J 2
    SHRS K 2
    TNT1 A 0 A_SpawnItemEx ("RLDoubleShotgunReloadDownRecoil", 0,0,0, 0,0,0, 0, SXF_NOCHECKPOSITION | SXF_SETMASTER) // Pitch-based recoil
    SHRS L 2
    SHRS M 2
    SHRS N 2
	TNT1 A 4 A_PlaySound("weapons/shreddershotgunopen", CHAN_ITEM)
    SHRS O 2
    SHRS P 2
    SHRS Q 2
	Goto ReloadWorking
  Reload1:
	TNT1 A 0 A_GunFlash ("FlashReload2", GFF_NOEXTCHANGE)
    SHRS F 2
    SHRS G 2
    SHRS H 2
    SHRS I 2
    SHRS J 2
    SHRS K 2
    TNT1 A 0 A_SpawnItemEx ("RLDoubleShotgunReloadDownRecoil", 0,0,0, 0,0,0, 0, SXF_NOCHECKPOSITION | SXF_SETMASTER) // Pitch-based recoil
    SHRS L 2
    SHRS M 2
    SHRS N 2
	TNT1 A 4 A_PlaySound("weapons/shreddershotgunopen", CHAN_ITEM)
    SHRS O 1
    SHRS P 1
    SHRS Q 1
	Goto ReloadWorking
  Reload2:
	TNT1 A 0 A_GunFlash ("FlashReload3", GFF_NOEXTCHANGE)
    SHRS F 2
    SHRS G 2
    SHRS H 2
    SHRS I 2
    SHRS J 2
    SHRS K 2
    TNT1 A 0 A_SpawnItemEx ("RLDoubleShotgunReloadDownRecoil", 0,0,0, 0,0,0, 0, SXF_NOCHECKPOSITION | SXF_SETMASTER) // Pitch-based recoil
    SHRS L 1
    SHRS M 1
    SHRS N 1
	TNT1 A 4 A_PlaySound("weapons/shreddershotgunopen", CHAN_ITEM)
    SHRS O 1
    SHRS P 1
    SHRS Q 1
	Goto ReloadWorking
  ReloadWorking:
	TNT1 A 0 A_TakeInventory("Shell", 2, TIF_NOTAKEINFINITE)
	TNT1 A 0 A_GiveInventory("RLShredderShotgunClip", 2)
  ReloadWorkingShredder:
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunBulkMod",1,2)
	TNT1 A 0 A_GiveInventory("RLShredderShotgunShredderClip", 20)
	Goto ReloadFinish
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunBulkMod",2,2)
	TNT1 A 0 A_GiveInventory("RLShredderShotgunShredderClip", 22)
	Goto ReloadFinish
	TNT1 A 0 A_GiveInventory("RLShredderShotgunShredderClip", 24)
	Goto ReloadFinish
  ReloadFinish:
    TNT1 A 0 A_PlaySound("weapons/shreddershotgunload", CHAN_WEAPON)
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunTechnicalMod",2,"ReloadFinish2")
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunTechnicalMod",1,"ReloadFinish1")
    SHRS R 2
    SHRS S 2
    TNT1 A 0 A_SpawnItemEx ("RLDoubleShotgunReloadUpRecoil", 0,0,0, 0,0,0, 0, SXF_NOCHECKPOSITION | SXF_SETMASTER) // Pitch-based recoil
	TNT1 A 4 A_PlaySound("weapons/shreddershotgunclose", CHAN_ITEM)
    SHRS T 2
    SHRS U 2
    SHRS V 2
    SHRS W 2
    SHRS F 2
    SHRS A 7 A_ReFire
	Goto Ready
  ReloadFinish1:
    SHRS R 2
    SHRS S 2
    TNT1 A 0 A_SpawnItemEx ("RLDoubleShotgunReloadUpRecoil", 0,0,0, 0,0,0, 0, SXF_NOCHECKPOSITION | SXF_SETMASTER) // Pitch-based recoil
	TNT1 A 4 A_PlaySound("weapons/shreddershotgunclose", CHAN_ITEM)
    SHRS T 2
    SHRS U 2
    SHRS V 1
    SHRS W 1
    SHRS F 1
    SHRS A 7 A_ReFire
	Goto Ready
  ReloadFinish2:
    SHRS R 2
    SHRS S 1
    TNT1 A 0 A_SpawnItemEx ("RLDoubleShotgunReloadUpRecoil", 0,0,0, 0,0,0, 0, SXF_NOCHECKPOSITION | SXF_SETMASTER) // Pitch-based recoil
	TNT1 A 4 A_PlaySound("weapons/shreddershotgunclose", CHAN_ITEM)
    SHRS T 1
    SHRS U 1
    SHRS V 1
    SHRS W 1
    SHRS F 1
    SHRS A 7 A_ReFire
	Goto Ready
	
  Flash:
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunMode", 1, "FlashSlug")
    SHR1 B 2 Bright A_Light1
    SHR1 C 2 Bright A_Light2
    TNT1 A 0 A_Light0
    SHR1 DEA 1 Bright
    Goto LightDone
  FlashSlug:
    SHR2 B 2 Bright A_Light1
    SHR2 C 2 Bright A_Light2
    TNT1 A 0 A_Light0
    SHR2 DEA 1 Bright
    Goto LightDone
  FlashShredder1:
    SHR3 Y 1 Bright A_Light1
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunFirestormMod",1,2)
    SHR3 Y 1 Bright
    TNT1 A 0 A_Light0
    Goto LightDone
  FlashShredder2:
    SHR3 Z 1 Bright A_Light2
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunFirestormMod",1,2)
    SHR3 Z 1 Bright
    TNT1 A 0 A_Light0
    Goto LightDone
  FlashShredderFinish:
    SHR3 AFA 1 Bright
    Goto LightDone
	
  FlashIdle:
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunMode", 2, "ShredderIdle")
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunMode", 1, "SlugIdle")
	TNT1 A 0 A_Jump(14, 2)
    SHR1 A 6 Bright A_Light0
    Goto LightDone
	TNT1 A 1 A_Light0
    SHR1 A 5 Bright A_Light0
    Goto LightDone
  SlugIdle:
	TNT1 A 0 A_Jump(14, 2)
    SHR2 A 6 Bright A_Light0
    Goto LightDone
	TNT1 A 1 A_Light0
    SHR2 A 5 Bright A_Light0
    Goto LightDone
  ShredderIdle:
	TNT1 A 0 A_Jump(14, 2)
    SHR3 A 6 Bright A_Light0
    Goto LightDone
	TNT1 A 1 A_Light0
    SHR3 A 5 Bright A_Light0
    Goto LightDone
	
  FlashIdleRegen:
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunMode", 2, "ShredderIdleRegen")
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunMode", 1, "SlugIdleRegen")
	TNT1 A 0 A_Jump(14, 2)
    SHR1 A 36 Bright A_Light0
    Goto LightDone
	TNT1 A 1 A_Light0
    SHR1 A 35 Bright A_Light0
    Goto LightDone
  SlugIdleRegen:
	TNT1 A 0 A_Jump(14, 2)
    SHR2 A 36 Bright A_Light0
    Goto LightDone
	TNT1 A 1 A_Light0
    SHR2 A 35 Bright A_Light0
    Goto LightDone
  ShredderIdleRegen:
	TNT1 A 0 A_Jump(14, 2)
    SHR3 A 36 Bright A_Light0
    Goto LightDone
	TNT1 A 1 A_Light0
    SHR3 A 35 Bright A_Light0
    Goto LightDone
	
  FlashReload1:
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunMode", 2, "FlashReload1Shredder")
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunMode", 1, "FlashReload1Slug")
	SHR1 A 0
	Goto FlashReload1Continue
  FlashReload1Slug:
	SHR2 A 0
	Goto FlashReload1Continue
  FlashReload1Shredder:
	SHR3 A 0
	Goto FlashReload1Continue
  FlashReload1Continue:
    "####" FGHIJKLMN 2 Bright
	"####" X 4
    "####" OPQRS 2 Bright
	"####" X 4
    "####" TUVWF 2 Bright
    "####" A 8 Bright
    Goto LightDone
  FlashReload2:
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunMode", 2, "FlashReload2Shredder")
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunMode", 1, "FlashReload2Slug")
	SHR1 A 0
	Goto FlashReload2Continue
  FlashReload2Slug:
	SHR2 A 0
	Goto FlashReload2Continue
  FlashReload2Shredder:
	SHR3 A 0
	Goto FlashReload2Continue
  FlashReload2Continue:
    "####" FGHIJKLMN 2 Bright
	"####" X 4
    "####" OPQ 1 Bright
    "####" RS 2 Bright
	"####" X 4
    "####" TU 2 Bright
    "####" VWF 1 Bright
    "####" A 8 Bright
    Goto LightDone
  FlashReload3:
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunMode", 2, "FlashReload3Shredder")
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunMode", 1, "FlashReload3Slug")
	SHR1 A 0
	Goto FlashReload3Continue
  FlashReload3Slug:
	SHR2 A 0
	Goto FlashReload3Continue
  FlashReload3Shredder:
	SHR3 A 0
	Goto FlashReload3Continue
  FlashReload3Continue:
    "####" FGHIJK 2 Bright
    "####" LMN 1 Bright
	"####" X 4
    "####" OPQ 1 Bright
    "####" R 2 Bright
    "####" S 1 Bright
	"####" X 4
    "####" TUVWF 1 Bright
    "####" A 8 Bright
    Goto LightDone
  FlashDrop:
    TNT1 A 0 A_Light0
    Goto LightDone
	
  Spawn:
	TNT1 A 0 NoDelay A_SpawnItemEx("RLShredderShotgunPickup",0,0,0, 0,0,0, 0,SXF_NOCHECKPOSITION, 0, tid)
    Stop
  Altfire:
	TNT1 A 0 A_JumpIfInventory("RLArmorModItemActivate",1, "ArmorModConversion")
	TNT1 A 0 A_JumpIfInventory("RLScavengerDrop",1,"ScavengerTime")
	TNT1 A 0 A_GunFlash ("FlashDrop", GFF_NOEXTCHANGE)
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunMode", 2, "SetSpreadMode")
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunMode", 1, "SetShredderMode")
    Goto SetSlugMode
  SetSlugMode:
	TNT1 A 0 A_GiveInventory("RLShredderShotgunMode", 1)
    TNT1 A 0 A_PlaySound("weapons/shreddershotgunmode", CHAN_WEAPON, 1, 0, 1.2)
    TNT1 A 0 A_Print("\ch< SLUG MODE ACTIVE >", 2, "CONFONT")
    SHRS A 4 A_WeaponReady (WRF_NOFIRE | WRF_ALLOWZOOM)
	TNT1 A 0 A_GunFlash ("FlashIdle", GFF_NOEXTCHANGE)
    SHRS A 10 A_WeaponReady (WRF_NOFIRE | WRF_ALLOWZOOM)
    Goto Ready
  SetShredderMode:
	TNT1 A 0 A_GiveInventory("RLShredderShotgunMode", 1)
    TNT1 A 0 A_PlaySound("weapons/shreddershotgunmode", CHAN_WEAPON, 1, 0, 1.2)
    TNT1 A 0 A_Print("\ck< SHREDDER MODE ACTIVE >", 2, "CONFONT")
    SHRS A 4 A_WeaponReady (WRF_NOFIRE | WRF_ALLOWZOOM)
	TNT1 A 0 A_GunFlash ("FlashIdle", GFF_NOEXTCHANGE)
    SHRS A 10 A_WeaponReady (WRF_NOFIRE | WRF_ALLOWZOOM)
    Goto Ready
  SetSpreadMode:
	TNT1 A 0 A_TakeInventory("RLShredderShotgunMode", 2)
    TNT1 A 0 A_PlaySound("weapons/shreddershotgunmode", CHAN_WEAPON, 1, 0, 1.2)
    TNT1 A 0 A_Print("\cg< SPREAD MODE ACTIVE >", 2, "CONFONT")
    SHRS A 4 A_WeaponReady (WRF_NOFIRE | WRF_ALLOWZOOM)
	TNT1 A 0 A_GunFlash ("FlashIdle", GFF_NOEXTCHANGE)
    SHRS A 10 A_WeaponReady (WRF_NOFIRE | WRF_ALLOWZOOM)
    Goto Ready
  ModDiscombobulation:
	TNT1 A 0 A_Print("Applied Mod pack extracted from discarded weapon.")
	TNT1 A 0 ACS_NamedExecuteAlways("ScavengeMods", 0)
	TNT1 A 3
	TNT1 A 0 A_TakeInventory("RLScavengerDrop",1)
    TNT1 A 0 A_TakeInventory("RLShredderShotgunModLimit", 2)
    TNT1 A 0 A_TakeInventory("RLShredderShotgunPowerMod", 2)
    TNT1 A 0 A_TakeInventory("RLShredderShotgunBulkMod", 2)
    TNT1 A 0 A_TakeInventory("RLShredderShotgunAgilityMod", 2)
    TNT1 A 0 A_TakeInventory("RLShredderShotgunTechnicalMod", 2)
    TNT1 A 0 A_TakeInventory("RLShredderShotgunSniperMod", 2)
    TNT1 A 0 A_TakeInventory("RLShredderShotgunFirestormMod", 2)
    TNT1 A 0 A_TakeInventory("RLShredderShotgunNanoMod", 2)
	TNT1 A 0 A_GiveInventory("RLRarityTokenRemover", 1)
	TNT1 A 0 A_TakeInventory("RLShredderShotgunSelected", 1)
	TNT1 A 0 A_TakeInventory("RLWeaponLimit",1)
	Goto ScavengerTimeEnd
  ScavengerTime:
	TNT1 A 0 A_GiveInventory("RLScavengingExtraEffects", 1)
    TNT1 A 0 A_GiveInventory("RLShredderPistolAssemblyLearntToken", 1) // Assembly is now listed in the HUD menus
	TNT1 A 0 A_JumpIfInventory("RLShredderShotgunModLimit",1,"ModDiscombobulation")
	TNT1 A 0 A_Print("Mod pack extracted from discarded weapon.")
	TNT1 A 0 A_TakeInventory("RLScavengerDrop",1)
    TNT1 A 0 A_TakeInventory("RLShredderShotgunModLimit", 2)
    TNT1 A 0 A_TakeInventory("RLShredderShotgunPowerMod", 2)
    TNT1 A 0 A_TakeInventory("RLShredderShotgunBulkMod", 2)
    TNT1 A 0 A_TakeInventory("RLShredderShotgunAgilityMod", 2)
    TNT1 A 0 A_TakeInventory("RLShredderShotgunTechnicalMod", 2)
    TNT1 A 0 A_TakeInventory("RLShredderShotgunSniperMod", 2)
    TNT1 A 0 A_TakeInventory("RLShredderShotgunFirestormMod", 2)
    TNT1 A 0 A_TakeInventory("RLShredderShotgunNanoMod", 2)
	TNT1 A 0 A_GiveInventory("RLRarityTokenRemover", 1)
	TNT1 A 0 A_TakeInventory("RLShredderShotgunSelected", 1)
	TNT1 A 0 A_TakeInventory("RLWeaponLimit",1)
	TNT1 A 0 A_Jump(32,2,3)
	TNT1 A 0 A_Jump(256,3,4,5,6)
	TNT1 A 0 A_FireCustomMissile("DroppedRLFirestormMod",0,0,0)
	Goto ScavengerTimeEnd
	TNT1 A 0 A_FireCustomMissile("DroppedRLSniperMod",0,0,0)
	Goto ScavengerTimeEnd
	TNT1 A 0 A_FireCustomMissile("DroppedRLBulkMod",0,0,0)
	Goto ScavengerTimeEnd
	TNT1 A 0 A_FireCustomMissile("DroppedRLPowerMod",0,0,0)
	Goto ScavengerTimeEnd
	TNT1 A 0 A_FireCustomMissile("DroppedRLAgilityMod",0,0,0)
	Goto ScavengerTimeEnd
	TNT1 A 0 A_FireCustomMissile("DroppedRLTechnicalMod",0,0,0)
	Goto ScavengerTimeEnd
  ScavengerTimeEnd:
	TNT1 A 1 A_TakeInventory("RLShredderShotgun",1)
	Stop
  }
}

//-------------------------------------------------------------------
//		MECHANICS

Actor RLShredderShotgunSelected : RLPermanentInventory {}
Actor RLShredderShotgunState : RLPermanentInventory {}
Actor RLShredderShotgunMode : RLPermanentInventory
{
inventory.maxamount 2
}

Actor RLShredderShotgunModLimit : RLBasicAssemblyModAmount {}
Actor RLShredderShotgunPowerMod : RLBasicAssemblyModAmount {}
Actor RLShredderShotgunBulkMod : RLBasicAssemblyModAmount {}
Actor RLShredderShotgunAgilityMod : RLBasicAssemblyModAmount {}
Actor RLShredderShotgunTechnicalMod : RLBasicAssemblyModAmount {}
Actor RLShredderShotgunNanoMod : RLBasicAssemblyModAmount {}
Actor RLShredderShotgunFirestormMod : RLBasicAssemblyModAmount {}
Actor RLShredderShotgunSniperMod : RLBasicAssemblyModAmount {}

ACTOR RLShredderShotgunClip : Ammo
{
   +INVENTORY.IGNORESKILL
   Inventory.MaxAmount 2
   Inventory.Icon ""
}

ACTOR RLShredderShotgunShredderClip : Ammo
{
   +INVENTORY.IGNORESKILL
   Inventory.MaxAmount 24
   Inventory.Icon ""
}

//-------------------------------------------------------------------
//		PICKUPS

ACTOR RLShredderShotgunPickup : RLBasicAssembledWeaponPickup 17440
{
	//$Sprite SHRSX0
	Tag "Shredder Shotgun [Pickup]"
	States
	{
	SpawnFrame:
		SHRS X 4
		"####" "#" 0 A_Jump(256, "SpawnLoop")
		Goto SpawnLoop
	SpawnLoop:
		"####" "#" 0 A_JumpIf(Abs(VelZ) <= 0.01 && user_floorhit == 0, "FloorHit")
		"####" "#" 1
		Loop
	FloorHit:
		"####" "#" 0 A_PlaySound("weapons/gundropmedium")
		"####" "#" 0 A_ScaleVelocity (0.5)
		"####" "#" 0 A_ChangeFlag("SPECIAL", true)
		"####" "#" 0 A_ChangeFlag("THRUACTORS", false)
		"####" "#" 0 A_SetUserVar("user_floorhit", 1)
		"####" "#" 0 A_Jump(256, "SpawnLoop")
		Stop
	Pickup:
		"####" "#" 0
		"####" "#" 0 A_JumpIfInventory("RLShredderShotgun",1,"NotPickup") // If the player already has this weapon, they are not given the weapon
		"####" "#" 0 A_JumpIfInventory("RLWeaponLimit",0,"NotPickupLimit") // The absolute max limit check for weapons
		"####" "#" 0 A_Jump(256, "GiveWeapon")
		Goto GiveWeapon
	GiveWeapon:
		"####" "#" 0 A_GiveInventory("RLShredderShotgun",1)
		"####" "#" 0 A_GiveInventory("RLWeaponLimit",1)
		"####" "#" 0 A_Print("\ccPicked up a \cvShredder Shotgun.")
		Goto PickupSound
	NotPickupLimit:
		"####" "#" 0 A_Jump(256, "NotPickup")
		Goto NotPickup
	NotPickup:
		"####" "#" 0 A_JumpIfInventory("DRLA_WeaponAntiLogFloodCheck",1,"NotPickup_NoPrint")
		"####" "#" 0 A_GiveInventory("DRLA_WeaponAntiLogFloodCheck")
		"####" "#" 0 A_Print("\cv= Shredder Shotgun =", 2, "CONFONT")
		Goto NotPickup_NoPrint
	NotPickup_NoPrint:
		"####" "#" 0
		Fail
	PickupSound:
		"####" "#" 0 A_PlaySound("weapons/ShredderShotgunpickup")
		Stop
//==============================================================================
	MarathonStuff:
		"####" "#" 0 A_SpawnItemEx("RLMarathonShells",0,0,0, 0,0,0, 0,SXF_NOCHECKPOSITION)
		Stop
	}
}

ACTOR RLShredderShotgunPickupModded : RLShredderShotgunPickup
{
	+INVENTORY.TRANSFER
	+DONTGIB
	States
	{
	Spawn:
		TNT1 A 0 NoDelay ACS_NamedExecuteAlways("GetWeaponMods", 0)
		TNT1 A 0 A_JumpIf(CallACS("DRLA_specialstarts") == 0, "NoSpecialStartsStuff")
		"####" "#" 0 A_Jump(256, "SpecialStartsStuff")
		Goto SpecialStartsStuff
		
	SpawnFrame:
		SHRS X 4
		"####" "#" 0 A_Jump(256, "SpawnLoop")
		Goto SpawnLoop
	SpawnLoop:
		"####" "#" 0 A_JumpIf(VelZ <= 0.01 && user_floorhit == 0, "FloorHit")
		"####" "#" 0 ACS_NamedExecuteAlways("RLWeaponModDisplay", 0)
		"####" "#" 1
		Loop
	GiveWeapon:
		"####" "#" 0 A_GiveInventory("RLShredderShotgun",1)
		"####" "#" 0 A_GiveInventory("RLWeaponLimit",1)
		"####" "#" 0 A_Print("\ccPicked up a \cbmodded \cvShredder Shotgun.")
		Goto PickupSound
	NotPickupLimit:
		"####" "#" 0 A_JumpIfInventory("DRLA_WeaponAntiLogFloodCheck",1,"NotPickup_NoPrint")
		"####" "#" 0 A_GiveInventory("DRLA_WeaponAntiLogFloodCheck")
		"####" "#" 0 A_Print("\cv= Shredder Shotgun =", 2, "CONFONT")
		Goto NotPickup_NoPrint
	NotPickup:
		"####" "#" 0 A_JumpIfInventory("RLShredderShotgunModLimit", 1, "NotPickup_Modded")
		"####" "#" 0 A_JumpIfInventory("DRLA_WeaponAntiLogFloodCheck",1,"NotPickup_NoPrint")
		"####" "#" 0 A_GiveInventory("DRLA_WeaponAntiLogFloodCheck")
		"####" "#" 0 A_Print("\cv= Shredder Shotgun =\n\n\ccYou replace your unmodded\n\ccweapon with the one you picked up.", 5, "CONFONT")
		"####" "#" 0 A_GiveInventory("Shell",4)
		Goto PickupSound
	NotPickup_Modded:
		"####" "#" 0 A_Print("\cv= Shredder Shotgun =\n\n\caYou are already carrying a modded\n\caweapon of this type", 5, "CONFONT")
		Fail
	}
}
