Code: Select all
class TestHandler : EventHandler
{
array < Class<Weapon> > mapweapons;
override void WorldThingSpawned(worldEvent e)
{
let weap = Weapon(e.thing);
if (weap)
{
if (mapweapons.Find(weap) == mapweapons.Size())
{
mapweapons.Push(weap);
}
}
}
}