Actor TechArmor : CustomInventory 
{
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Picked up the UAC Level-IV Energy Tech Armor"
  Inventory.Icon ARM5B0
  Inventory.InterHubAmount 2
  Inventory.MaxAmount 2
  +Inventory.InvBar
  +FloorClip
  States
  {
  Spawn:
    ARM5 A -1
    Loop
  Use:
    TNT1 A 0 A_JumpIfInventory("AmmoCell", 300, "Succeed")
    TNT1 A 0 A_Print("Not enough energy cells")
    TNT1 A 0 A_GiveInventory("TechArmor", 1)
    Stop
  Succeed:
    TNT1 A 0 A_PlaySoundEx("Pickups/TechArmor", "SoundSlot7", 0)
    TNT1 A 0 A_TakeInventory("AmmoCell", 300)
    TNT1 A 0 A_GiveInventory("TechArmorProtection", 300)
    Stop
  }
}

Actor TechArmorProtection : BasicArmorPickup
{
  Inventory.Icon "ARM5A0"
  Armor.SaveAmount 300
  Armor.SavePercent 100.01
  States
  {
  Spawn:
    TNT1 A 1
    Fail
  }
}
