ACTOR Beacon : CustomInventory 30035
{
  +COUNTITEM
  +DONTGIB
  +SHOOTABLE
  +INVENTORY.INVBAR
    +CANNOTPUSH
  health 500
  damagefactor "Disarm", 1000.0
  Inventory.InterHubAmount 1
  Inventory.MaxAmount 1
  Inventory.Icon "BEACB0"
  Inventory.PickupMessage "$GOTBEACON"
  Inventory.pickupsound "ETCPKUP"
  States
  {
  Spawn:
	TNT1 A 0
Stay:
    BEAC A 1 a_jumpifinventory("removeingredient",1,"Disappear")
    loop
  Use:
    TNT1 A 1 A_SpawnItemEx ("ActiveBeacon", 56, 0, 8, 0, 0, 0, 0, 1)
    Stop
	
	death.Disarm:
	 TNT1 AA 0 A_spawnitemex("electronicparts",0,0,2,random(0,2),random(0,2),0)
	 TNT1 A 0 A_spawnitemex("SCRAPMETAL",0,0,2,random(0,2),random(0,2),0)
	 STOP
	 
	 Disappear:
	 TNT1 A 0
	 stop
	
  }
}

actor ActiveBeacon
{
  -SOLID
  -SHOOTABLE
  States
  {
  Spawn:
    BEAC A 105
    BEAC A 0 A_CustomMissile ("TeleportFog", 0, 0, 0, 0, 0)
    BEAC A 0 A_SpawnItemEx ("RandomMarine", 0, 0, 8, 0, 0, 0, 0, 1)
    BEAC A 105
    BEAC A 0 A_CustomMissile ("TeleportFog", 0, 0, 0, 0, 0)
    BEAC A 0 A_SpawnItemEx ("RandomMarine", 0, 0, 8, 0, 0, 0, 0, 1)
    BEAC A 105
    BEAC A 0 A_CustomMissile ("TeleportFog", 0, 0, 0, 0, 0)
    BEAC A 0 A_SpawnItemEx ("RandomMarine", 0, 0, 8, 0, 0, 0, 0, 1)
    BEAC A 105
    goto Death
  Death:
    TNT1 A 1 A_CustomMissile ("TeleportFog", 0, 0, 0, 0, 0)
    stop
  }
}