// Armor Spawners

ACTOR LightArmorSpawner : RandomSpawner
{
	DropItem "IDMYellowArmor"
	DropItem "BulletArmor"
	DropItem "FragArmor"
	DropItem "TechArmor"
}

ACTOR HeavyArmorSpawner : RandomSpawner
{
	DropItem "IDMBlueArmor"
	DropItem "IDMRedArmor"
	DropItem "PurpleArmor"
	DropItem "SuperArmor"
}


ACTOR LightArmorSpawnActor : CustomInventory replaces GreenArmor
{
	Tag "Light Armor Spawner"
	//$Category Health and Armor
	//$Sprite ARMYA0
	+NOBLOCKMAP
	+NOGRAVITY
	States
	{
	Spawn:
	  TNT1 A 0
	  TNT1 A 1
	  TNT1 A 1 A_JumpIf(ACS_NamedExecuteWithResult("GunModifierSpawn") == 666,"Nothing")
	  TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("WeaponGroupSpawn") == 1,"ShotGun")
	  TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("WeaponGroupSpawn") == 2,"BulletGun")
	  TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("WeaponGroupSpawn") == 3,"ExplGun")
	  TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("WeaponGroupSpawn") == 4,"PlasmaGun")
	  TNT1 A 1 A_SpawnItemEx("LightArmorSpawner")
	Nothing:
	  TNT1 A 1
	  TNT1 A -1
	  Stop
	ShotGun:
	BulletGun:
	  TNT1 A 1 A_SpawnItemEx("BulletArmorSpawner")
	  Stop
	ExplGun:
	  TNT1 A 1 A_SpawnItemEx("FragArmorSpawner")
	  Stop
	PlasmaGun:
	  TNT1 A 1 A_SpawnItemEx("TechArmorSpawner")
	  Stop
	}
}

ACTOR HeavyArmorSpawnActor : CustomInventory replaces BlueArmor
{
	Tag "Heavy Armor Spawner"
	//$Category Health and Armor
	//$Sprite ARM2A0
	+NOBLOCKMAP
	+NOGRAVITY
	States
	{
	Spawn:
	  TNT1 A 0
	  TNT1 A 1
	  TNT1 A 1 A_JumpIf(ACS_NamedExecuteWithResult("GunModifierSpawn") == 666,"Nothing")
	  TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("WeaponGroupSpawn") == 1,"ShotGun")
	  TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("WeaponGroupSpawn") == 2,"BulletGun")
	  TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("WeaponGroupSpawn") == 3,"ExplGun")
	  TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("WeaponGroupSpawn") == 4,"PlasmaGun")
	  TNT1 A 1 A_SpawnItemEx("HeavyArmorSpawner")
	Nothing:
	  TNT1 A 1
	  TNT1 A -1
	  Stop
	ShotGun:
	BulletGun:
	  TNT1 A 1 A_SpawnItemEx("BlueArmorSpawner")
	  Stop
	ExplGun:
	  TNT1 A 1 A_SpawnItemEx("RedArmorSpawner")
	  Stop
	PlasmaGun:
	  TNT1 A 1 A_SpawnItemEx("PurpleArmorSpawner")
	  Stop
	}
}