[go: up one dir, main page]

Menu

[897c37]: / mlib / S / living.lpc  Maximize  Restore  History

Download this file

56 lines (43 with data), 830 Bytes

//
// Keep track of all living objects
//
// Dredd 2001.
//


object living;

reset()
{
    living = clone_object("RO/lib/bag");
    living->setup(0, 701, 1);
}

query_destruct()
{
    //if (!living) reset();
    if (living) destruct(living);
}

object find_living((int|string) name)
{
    object pob;
    array what;

    //if (!living) reset();
    if (!name) return;
    pob = find_player(name);
    if (pob) return pob;

    what = living->query(name);
    if (!arrayp(what) || sizeof(what) == 0) return 0;
    return what[0];
}

object remove_living(object ob, (int|string) name)
{
    //if (!living) reset();
    if (!name) return;
    return living->remove(name, ob);
}

set_living_name(object ob, string name)
{
    //if (!living) reset();
    living->add(name, ob);
}

show_stats()
{
    return living->show_stats();
}