ACTOR Supplies_Health_Big : Ammo
{
	Inventory.Icon "MEDIA0"
	Inventory.Amount 1
	Inventory.MaxAmount 10
	
	Ammo.BackpackAmount 2
	Ammo.BackpackMaxAmount 20
	
	States
	{
		Spawn:
			MEDI A -1
			stop
	}
}

ACTOR Supplies_Ammo_Big : Ammo
{
	Inventory.Icon "AMMOA0"
	Inventory.Amount 1
	Inventory.MaxAmount 10
	
	Ammo.BackpackAmount 2
	Ammo.BackpackMaxAmount 20
	
	States
	{
		Spawn:
			MEDI A -1
			stop
	}
}

ACTOR Supplies_Health : Ammo
{
	Inventory.Icon "StimA0"
	Inventory.Amount 1
	Inventory.MaxAmount 10
	
	Ammo.BackpackAmount 2
	Ammo.BackpackMaxAmount 20
	
	States
	{
		Spawn:
			MEDI A -1
			stop
	}
}

ACTOR Supplies_Ammo : Ammo
{
	Inventory.Icon "ClipA0"
	Inventory.Amount 1
	Inventory.MaxAmount 10
	
	Ammo.BackpackAmount 2
	Ammo.BackpackMaxAmount 20
	
	States
	{
		Spawn:
			MEDI A -1
			stop
	}
}

Actor Sup_HealMode : Inventory {Inventory.MaxAmount 1}

ACTOR Supplier : Weapon
{
	Weapon.AmmoUse1			1
	Weapon.AmmoGive1 		8
	Weapon.AmmoType1			"Supplies_Ammo"
	Weapon.AmmoUse2 		1
	Weapon.AmmoGive2 		8
	Weapon.AmmoType2			"Supplies_Health"
	Inventory.PickupMessage		"You got the Stocker!"
	Obituary			"Hmmm. That appears to be a bug. I otta fix that somehow..."
	
	Weapon.UpSound			"w/load4"
	
	States
	{
		Ready:
			TNT1 A 0 A_JumpIfInventory("Sup_HealMode",1,"ReadyHealth")
		ReadyAmmo:
			W7E1 A 1 A_WeaponReady
			loop
		ReadyHealth:
			W7E2 A 1 A_WeaponReady
			loop
		Deselect:
			TNT1 A 0 A_JumpIfInventory("Sup_HealMode",1,3)
			W7E1 A 1 A_Lower
			W7E1 A 0 A_Lower
			goto Deselect
			W7E2 A 1 A_Lower
			W7E2 A 0 A_Lower
			goto Deselect + 4
		Select:
			TNT1 A 0 A_JumpIfInventory("Sup_HealMode",1,3)
			W7E1 A 1 A_Raise
			W7E1 A 0 A_Raise
			goto Select
			W7E2 A 1 A_Raise
			W7E2 A 0 A_Raise
			goto Select + 4
		Fire:
			TNT1 A 0 A_TakeInventory("Sup_HealMode", 1)
			W7E1 A 0 A_PlaySound("w6/up")
			W7E1 A 3 A_SpawnItem ("ClipBox" , 60, 0, 0, 0)
			W7E1 A 0 A_SpawnItem ("ShellBox" , 70, 0, 0, 0)
			W7E1 A 0 A_SpawnItem ("RocketBox" , 80, 0, 0, 0)
			W7E1 A 0 A_SpawnItem ("CellPack" , 90, 0, 0, 0)
			W7E1 A 3 A_TakeInventory("Supplies_Ammo", 1)
			W7E1 BCDE 5
			W7E1 A 5 A_Refire
			goto Ready
		Altfire:
			TNT1 A 0 A_GiveInventory("Sup_HealMode", 1)
			W7E2 A 0 A_PlaySound("w6/up")
			W7E2 A 3 A_SpawnItem ("Medikit" , 20, 0, 0, 0)
			W7E2 A 3 A_TakeInventory("Supplies_Health", 1)
			W7E2 BCDE 5
			W7E2 A 5 A_Refire
			goto Ready
	}
}

ACTOR Supplier_Big : Weapon
{
	Weapon.AmmoUse1			1
	Weapon.AmmoGive1 		8
	Weapon.AmmoType1			"Supplies_Ammo_Big"
	Weapon.AmmoUse2 		1
	Weapon.AmmoGive2 		8
	Weapon.AmmoType2			"Supplies_Health_Big"
	Inventory.PickupMessage		"You got the Stocker!"
	Obituary			"Hmmm. That appears to be a bug. I otta fix that somehow..."
	
	Weapon.UpSound			"w/load4"
	
	States
	{
		Ready:
			TNT1 A 0 A_JumpIfInventory("Sup_HealMode",1,"ReadyHealth")
		ReadyAmmo:
			W7E1 A 1 A_WeaponReady
			loop
		ReadyHealth:
			W7E2 A 1 A_WeaponReady
			loop
		Deselect:
			TNT1 A 0 A_JumpIfInventory("Sup_HealMode",1,3)
			W7E1 A 1 A_Lower
			W7E1 A 0 A_Lower
			goto Deselect
			W7E2 A 1 A_Lower
			W7E2 A 0 A_Lower
			goto Deselect + 4
		Select:
			TNT1 A 0 A_JumpIfInventory("Sup_HealMode",1,3)
			W7E1 A 1 A_Raise
			W7E1 A 0 A_Raise
			goto Select
			W7E2 A 1 A_Raise
			W7E2 A 0 A_Raise
			goto Select + 4
		Fire:
			TNT1 A 0 A_TakeInventory("Sup_HealMode", 1)
			W7E1 A 0 A_PlaySound("w6/up")
			W7E1 A 3 A_SpawnItemEx ("ClipBox" , random(-32,32), random(-32,32), 0)
			W7E1 A 0 A_SpawnItemEx ("ClipBox" , random(-32,32), random(-32,32), 0)
			W7E1 A 0 A_SpawnItemEx ("ShellBox" , random(-32,32), random(-32,32), 0)
			W7E1 A 0 A_SpawnItemEx ("ShellBox" , random(-32,32), random(-32,32), 0)
			W7E1 A 0 A_SpawnItemEx ("RocketBox" , random(-32,32), random(-32,32), 0)
			W7E1 A 0 A_SpawnItemEx ("RocketBox" , random(-32,32), random(-32,32), 0)
			W7E1 A 0 A_SpawnItemEx ("CellPack" , random(-32,32), random(-32,32), 0)
			W7E1 A 0 A_SpawnItemEx ("CellPack" , random(-32,32), random(-32,32), 0)
			W7E1 A 3 A_TakeInventory("Supplies_Ammo_Big", 1)
			W7E1 BCDE 5
			W7E1 A 5 A_Refire
			goto Ready
		Altfire:
			TNT1 A 0 A_GiveInventory("Sup_HealMode", 1)
			W7E2 A 0 A_PlaySound("w6/up")
			W7E2 A 3 A_SpawnItemEX ("Medikit" , random(-32,32),random(-32,32), 0)
			W7E2 A 0 A_SpawnItemEx ("Medikit" , random(-32,32), random(-32,32), 0)
			W7E2 A 0 A_SpawnItemEx ("Medikit" , random(-32,32),random(-32,32), 0)
			W7E2 A 3 A_TakeInventory("Supplies_Health_Big", 1)
			W7E2 BCDE 5
			W7E2 A 5 A_Refire
			goto Ready
	}
}
