Actor Flare : CustomInventory
{
  Radius 4
  Height 18
  +INVENTORY.INVBAR
  Inventory.MaxAmount 20
  Inventory.Icon "SPOFE0"
  Inventory.PickupMessage "You picked up a flare."
  States
  {
  Spawn:
    SPOF D -1
    Stop
  Use:
    TNT1 A 1 A_SpawnItemEx ("ActiveFlare", 56, 0, 28, 0, 0, 0, 0, 1)
    Stop
  }
}

Actor ActiveFlare
{
  Radius 22
  Height 11
  States
  {
  Spawn:
    SPOF A 0 Bright
    SPOF A 0 Bright A_PlaySound("Flare/Light")
    SPOF A 0 Bright A_PlaySound("Flare/Loop",7,1.0,1)
    SPOF AB 1 Bright
    Goto Spawn+3
  }
}

Actor FlareBox : CustomInventory
{
  Radius 28
  Height 16
  Inventory.PickupMessage "You picked up a box of flares."
  States
  {
  Spawn:
    SPOF C -1
    Stop
  Pickup:
    TNT1 A 1 A_GiveInventory("Flare", 5)
    Stop
  }
}
