#include DesertEagle.txt
ACTOR ShotgunSpawner: CustomInventory Replaces Shotgun
{
 scale 0.8
 radius 24
 height 24
 +THRUACTORS +FORCEXYBILLBOARD
 Inventory.PickupMessage "You got the Pump Shotgun! (Slot 3)"
 Inventory.PickupSound "weapons/sgpump"
 Mass 1
    States
    {

	 Spawn:
		SGN2 A 0
		MARN A 0 ACS_NamedExecuteAlways("BDDisableNewGuns", 0, 0, 0, 0)//Check if advanced decorations are disabled.
		SGN2 A 2
		TNT1 A 0 A_Jump(96, "Spawn2")
		
	Vanilla:
	Spawn1:
		TNT1 A 0
		TNT1 A 0 A_SpawnItemEx ("ShotgunSpawned",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION | SXF_TRANSFERAMBUSHFLAG ,0)
		TNT1 A 1
		TNT1 A -1
		Stop
	
	 Spawn2:
		TNT1 A 0
		TNT1 A 0 A_SpawnItemEx ("DesertEagleSpawner",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION | SXF_TRANSFERAMBUSHFLAG ,0)
		TNT1 A 1
		TNT1 A -1
		Stop
    }
}


ACTOR ShotgunSpawned: CustomInventory
{
 scale 0.8
 radius 24
 height 24
 +THRUACTORS +FORCEXYBILLBOARD

 Inventory.PickupMessage "You got the Pump Shotgun! (Slot 3)"
 Inventory.PickupSound "weapons/sgpump"
 Mass 1
    States
    {

	 Spawn:
		SHTC A 0
		SHTC A 2
		TNT1 A 0 A_ChangeFlag("THRUACTORS", 0)
		TNT1 A 0 A_SpawnItem("FakeOldSGSprite")
		TNT1 A 0 A_SpawnItem("FakeNewSGSprite")
		Loop
	Pickup:
	    TNT1 A 0
		TNT1 A 0 A_JumpIfInventory("IsPlayingAsPurist", 1, "Purist")
		TNT1 A 0 A_GiveInventory("Shot_Gun", 1)
		TNT1 A 0 A_GiveInventory("AmmoShell", 8)
		Stop
	Purist:
	    TNT1 A 0 A_GiveInventory("ClassicShotgun", 1)
		TNT1 A 0 A_GiveInventory("AmmoShell", 8)
		Stop
    }
}

ACTOR DesertEagleSpawner: CustomInventory
{
 scale 0.8
 radius 12
 height 8
 +THRUACTORS +FORCEXYBILLBOARD

 Inventory.PickupMessage "You got the Desert Eagle! (Slot 2)"
 Inventory.PickupSound "DEGBOL1"
 Mass 1
    States
    {

	 Spawn:
		SHTC A 0
		DEGP A 2
		TNT1 A 0 A_ChangeFlag("THRUACTORS", 0)
		Loop
	Pickup:
	    TNT1 A 0
		TNT1 A 0 A_JumpIfInventory("Deserteagle", 1, "YouhaveDeagle")
		TNT1 A 0 A_JumpIfInventory("IsPlayingAsPurist", 1, "Purist")
		TNT1 A 0 A_GiveInventory("DesertEagle", 1)
		TNT1 A 0 A_GiveInventory("DesertEagleAmmo", 10)
		Stop
	YouhaveDeagle:
		TNT1 A 0 A_JumpIfInventory("IsPlayingAsPurist", 1, "Purist")
		TNT1 A 0 A_GiveInventory("Clip1", 30)
	Purist:
		TNT1 A 0 A_GiveInventory("AmmoShell", 8)
		Stop
    }
}