skylib_fluffos_v3/
skylib_fluffos_v3/bin/
skylib_fluffos_v3/bin/db/
skylib_fluffos_v3/fluffos-2.9-ds2.04/
skylib_fluffos_v3/fluffos-2.9-ds2.04/ChangeLog.old/
skylib_fluffos_v3/fluffos-2.9-ds2.04/Win32/
skylib_fluffos_v3/fluffos-2.9-ds2.04/compat/
skylib_fluffos_v3/fluffos-2.9-ds2.04/compat/simuls/
skylib_fluffos_v3/fluffos-2.9-ds2.04/include/
skylib_fluffos_v3/fluffos-2.9-ds2.04/testsuite/
skylib_fluffos_v3/fluffos-2.9-ds2.04/testsuite/clone/
skylib_fluffos_v3/fluffos-2.9-ds2.04/testsuite/command/
skylib_fluffos_v3/fluffos-2.9-ds2.04/testsuite/data/
skylib_fluffos_v3/fluffos-2.9-ds2.04/testsuite/etc/
skylib_fluffos_v3/fluffos-2.9-ds2.04/testsuite/include/
skylib_fluffos_v3/fluffos-2.9-ds2.04/testsuite/inherit/
skylib_fluffos_v3/fluffos-2.9-ds2.04/testsuite/inherit/master/
skylib_fluffos_v3/fluffos-2.9-ds2.04/testsuite/log/
skylib_fluffos_v3/fluffos-2.9-ds2.04/testsuite/single/
skylib_fluffos_v3/fluffos-2.9-ds2.04/testsuite/single/tests/compiler/
skylib_fluffos_v3/fluffos-2.9-ds2.04/testsuite/single/tests/efuns/
skylib_fluffos_v3/fluffos-2.9-ds2.04/testsuite/single/tests/operators/
skylib_fluffos_v3/fluffos-2.9-ds2.04/testsuite/u/
skylib_fluffos_v3/fluffos-2.9-ds2.04/tmp/
skylib_fluffos_v3/fluffos-2.9-ds2.04/windows/
skylib_fluffos_v3/mudlib/
skylib_fluffos_v3/mudlib/cmds/
skylib_fluffos_v3/mudlib/cmds/admin/
skylib_fluffos_v3/mudlib/cmds/guild-race/
skylib_fluffos_v3/mudlib/cmds/living/broken/
skylib_fluffos_v3/mudlib/cmds/player/group_cmds/
skylib_fluffos_v3/mudlib/cmds/playtester/
skylib_fluffos_v3/mudlib/d/admin/
skylib_fluffos_v3/mudlib/d/admin/room/
skylib_fluffos_v3/mudlib/d/admin/room/we_care/
skylib_fluffos_v3/mudlib/d/admin/save/
skylib_fluffos_v3/mudlib/d/admin/text/
skylib_fluffos_v3/mudlib/d/learning/TinyTown/buildings/
skylib_fluffos_v3/mudlib/d/learning/TinyTown/map/
skylib_fluffos_v3/mudlib/d/learning/TinyTown/roads/
skylib_fluffos_v3/mudlib/d/learning/chars/
skylib_fluffos_v3/mudlib/d/learning/functions/
skylib_fluffos_v3/mudlib/d/learning/handlers/
skylib_fluffos_v3/mudlib/d/learning/help_topics/
skylib_fluffos_v3/mudlib/d/learning/help_topics/npcs/
skylib_fluffos_v3/mudlib/d/learning/help_topics/objects/
skylib_fluffos_v3/mudlib/d/learning/help_topics/rcs_demo/
skylib_fluffos_v3/mudlib/d/learning/help_topics/rcs_demo/RCS/
skylib_fluffos_v3/mudlib/d/learning/help_topics/rooms/
skylib_fluffos_v3/mudlib/d/learning/help_topics/rooms/crowd/
skylib_fluffos_v3/mudlib/d/learning/help_topics/rooms/situations/
skylib_fluffos_v3/mudlib/d/learning/save/
skylib_fluffos_v3/mudlib/d/learning/school/
skylib_fluffos_v3/mudlib/d/learning/school/add_sc/
skylib_fluffos_v3/mudlib/d/learning/school/characters/
skylib_fluffos_v3/mudlib/d/learning/school/general/
skylib_fluffos_v3/mudlib/d/learning/school/getting-started/
skylib_fluffos_v3/mudlib/d/learning/school/getting-started/basic_commands/
skylib_fluffos_v3/mudlib/d/learning/school/getting-started/edtutor/
skylib_fluffos_v3/mudlib/d/learning/school/getting-started/unix_tutor/
skylib_fluffos_v3/mudlib/d/learning/school/items/
skylib_fluffos_v3/mudlib/d/learning/school/npc_school/
skylib_fluffos_v3/mudlib/d/learning/school/room_school/
skylib_fluffos_v3/mudlib/d/learning/school/room_school/room_basic/
skylib_fluffos_v3/mudlib/d/learning/school/room_school/situations/
skylib_fluffos_v3/mudlib/d/learning/school/room_school/terrain_tutor/
skylib_fluffos_v3/mudlib/d/learning/text/
skylib_fluffos_v3/mudlib/d/liaison/
skylib_fluffos_v3/mudlib/d/mudlib/
skylib_fluffos_v3/mudlib/d/mudlib/changes/
skylib_fluffos_v3/mudlib/d/playtesters/
skylib_fluffos_v3/mudlib/d/playtesters/effects/
skylib_fluffos_v3/mudlib/d/playtesters/handlers/
skylib_fluffos_v3/mudlib/d/playtesters/items/
skylib_fluffos_v3/mudlib/d/sage/
skylib_fluffos_v3/mudlib/doc/
skylib_fluffos_v3/mudlib/doc/creator/
skylib_fluffos_v3/mudlib/doc/driver/
skylib_fluffos_v3/mudlib/doc/driver/efuns/arrays/
skylib_fluffos_v3/mudlib/doc/driver/efuns/buffers/
skylib_fluffos_v3/mudlib/doc/driver/efuns/calls/
skylib_fluffos_v3/mudlib/doc/driver/efuns/compile/
skylib_fluffos_v3/mudlib/doc/driver/efuns/filesystem/
skylib_fluffos_v3/mudlib/doc/driver/efuns/floats/
skylib_fluffos_v3/mudlib/doc/driver/efuns/functions/
skylib_fluffos_v3/mudlib/doc/driver/efuns/general/
skylib_fluffos_v3/mudlib/doc/driver/efuns/mappings/
skylib_fluffos_v3/mudlib/doc/driver/efuns/mixed/
skylib_fluffos_v3/mudlib/doc/driver/efuns/mudlib/
skylib_fluffos_v3/mudlib/doc/driver/efuns/numbers/
skylib_fluffos_v3/mudlib/doc/driver/efuns/parsing/
skylib_fluffos_v3/mudlib/doc/login/
skylib_fluffos_v3/mudlib/doc/lpc/basic_manual/
skylib_fluffos_v3/mudlib/doc/lpc/intermediate/
skylib_fluffos_v3/mudlib/doc/new/add_command/
skylib_fluffos_v3/mudlib/doc/new/events/
skylib_fluffos_v3/mudlib/doc/new/handlers/
skylib_fluffos_v3/mudlib/doc/new/living/race/
skylib_fluffos_v3/mudlib/doc/new/living/spells/
skylib_fluffos_v3/mudlib/doc/new/object/
skylib_fluffos_v3/mudlib/doc/new/player/
skylib_fluffos_v3/mudlib/doc/new/room/guild/
skylib_fluffos_v3/mudlib/doc/new/room/outside/
skylib_fluffos_v3/mudlib/doc/new/room/storeroom/
skylib_fluffos_v3/mudlib/doc/object/
skylib_fluffos_v3/mudlib/doc/playtesters/
skylib_fluffos_v3/mudlib/doc/policy/
skylib_fluffos_v3/mudlib/doc/weapons/
skylib_fluffos_v3/mudlib/global/
skylib_fluffos_v3/mudlib/global/creator/
skylib_fluffos_v3/mudlib/handlers/
skylib_fluffos_v3/mudlib/include/casino/
skylib_fluffos_v3/mudlib/include/cmds/
skylib_fluffos_v3/mudlib/include/effects/
skylib_fluffos_v3/mudlib/include/npc/
skylib_fluffos_v3/mudlib/include/room/
skylib_fluffos_v3/mudlib/include/shops/
skylib_fluffos_v3/mudlib/net/daemon/
skylib_fluffos_v3/mudlib/net/daemon/chars/
skylib_fluffos_v3/mudlib/net/inherit/
skylib_fluffos_v3/mudlib/net/obj/
skylib_fluffos_v3/mudlib/net/obj/BACKUPS/
skylib_fluffos_v3/mudlib/obj/amulets/
skylib_fluffos_v3/mudlib/obj/armours/plate/
skylib_fluffos_v3/mudlib/obj/b_day/
skylib_fluffos_v3/mudlib/obj/clothes/transport/horse/
skylib_fluffos_v3/mudlib/obj/faith/symbols/
skylib_fluffos_v3/mudlib/obj/fungi/
skylib_fluffos_v3/mudlib/obj/gatherables/
skylib_fluffos_v3/mudlib/obj/instruments/
skylib_fluffos_v3/mudlib/obj/media/
skylib_fluffos_v3/mudlib/obj/misc/player_shop/
skylib_fluffos_v3/mudlib/obj/monster/godmother/
skylib_fluffos_v3/mudlib/obj/monster/transport/
skylib_fluffos_v3/mudlib/obj/rings/
skylib_fluffos_v3/mudlib/obj/scabbards/
skylib_fluffos_v3/mudlib/obj/spells/
skylib_fluffos_v3/mudlib/obj/stationery/
skylib_fluffos_v3/mudlib/obj/stationery/envelopes/
skylib_fluffos_v3/mudlib/obj/toys/
skylib_fluffos_v3/mudlib/obj/vessels/
skylib_fluffos_v3/mudlib/obj/weapons/axes/
skylib_fluffos_v3/mudlib/obj/weapons/chains/
skylib_fluffos_v3/mudlib/obj/weapons/maces/BACKUPS/
skylib_fluffos_v3/mudlib/save/autodoc/
skylib_fluffos_v3/mudlib/save/book_handler/
skylib_fluffos_v3/mudlib/save/books/history/calarien/
skylib_fluffos_v3/mudlib/save/mail/
skylib_fluffos_v3/mudlib/save/new_soul/data/
skylib_fluffos_v3/mudlib/save/parcels/
skylib_fluffos_v3/mudlib/save/playerinfo/
skylib_fluffos_v3/mudlib/save/players/d/
skylib_fluffos_v3/mudlib/save/players/s/
skylib_fluffos_v3/mudlib/save/random_names/
skylib_fluffos_v3/mudlib/save/random_names/data/
skylib_fluffos_v3/mudlib/save/terrains/
skylib_fluffos_v3/mudlib/save/terrains/tutorial_desert/
skylib_fluffos_v3/mudlib/save/terrains/tutorial_grassy_field/
skylib_fluffos_v3/mudlib/save/terrains/tutorial_mountain/
skylib_fluffos_v3/mudlib/save/todo_lists/
skylib_fluffos_v3/mudlib/secure/
skylib_fluffos_v3/mudlib/secure/cmds/admin/
skylib_fluffos_v3/mudlib/secure/cmds/lord/
skylib_fluffos_v3/mudlib/secure/config/
skylib_fluffos_v3/mudlib/secure/handlers/autodoc/
skylib_fluffos_v3/mudlib/secure/handlers/intermud/
skylib_fluffos_v3/mudlib/secure/include/global/
skylib_fluffos_v3/mudlib/secure/save/
skylib_fluffos_v3/mudlib/secure/save/handlers/
skylib_fluffos_v3/mudlib/secure/std/
skylib_fluffos_v3/mudlib/secure/std/classes/
skylib_fluffos_v3/mudlib/secure/std/modules/
skylib_fluffos_v3/mudlib/std/creator/
skylib_fluffos_v3/mudlib/std/dom/
skylib_fluffos_v3/mudlib/std/effects/
skylib_fluffos_v3/mudlib/std/effects/external/
skylib_fluffos_v3/mudlib/std/effects/fighting/
skylib_fluffos_v3/mudlib/std/effects/magic/
skylib_fluffos_v3/mudlib/std/effects/magic/BACKUPS/
skylib_fluffos_v3/mudlib/std/effects/other/BACKUPS/
skylib_fluffos_v3/mudlib/std/effects/priest/
skylib_fluffos_v3/mudlib/std/effects/room/
skylib_fluffos_v3/mudlib/std/environ/
skylib_fluffos_v3/mudlib/std/guilds/
skylib_fluffos_v3/mudlib/std/guilds/old/
skylib_fluffos_v3/mudlib/std/languages/
skylib_fluffos_v3/mudlib/std/liquids/
skylib_fluffos_v3/mudlib/std/npc/
skylib_fluffos_v3/mudlib/std/npc/goals/
skylib_fluffos_v3/mudlib/std/npc/goals/basic/
skylib_fluffos_v3/mudlib/std/npc/goals/misc/
skylib_fluffos_v3/mudlib/std/npc/plans/
skylib_fluffos_v3/mudlib/std/npc/plans/basic/
skylib_fluffos_v3/mudlib/std/npc/types/
skylib_fluffos_v3/mudlib/std/npc/types/helper/
skylib_fluffos_v3/mudlib/std/npcs/
skylib_fluffos_v3/mudlib/std/outsides/
skylib_fluffos_v3/mudlib/std/races/shadows/
skylib_fluffos_v3/mudlib/std/room/basic/BACKUPS/
skylib_fluffos_v3/mudlib/std/room/basic/topography/
skylib_fluffos_v3/mudlib/std/room/controller/
skylib_fluffos_v3/mudlib/std/room/inherit/topography/
skylib_fluffos_v3/mudlib/std/room/topography/area/
skylib_fluffos_v3/mudlib/std/room/topography/iroom/
skylib_fluffos_v3/mudlib/std/room/topography/milestone/
skylib_fluffos_v3/mudlib/std/shadows/curses/
skylib_fluffos_v3/mudlib/std/shadows/disease/
skylib_fluffos_v3/mudlib/std/shadows/fighting/
skylib_fluffos_v3/mudlib/std/shadows/healing/
skylib_fluffos_v3/mudlib/std/shadows/magic/
skylib_fluffos_v3/mudlib/std/shadows/poison/
skylib_fluffos_v3/mudlib/std/shadows/room/
skylib_fluffos_v3/mudlib/std/shops/controllers/
skylib_fluffos_v3/mudlib/std/shops/objs/
skylib_fluffos_v3/mudlib/std/shops/player_shop/
skylib_fluffos_v3/mudlib/std/socket/
skylib_fluffos_v3/mudlib/std/soul/d/
skylib_fluffos_v3/mudlib/std/soul/e/
skylib_fluffos_v3/mudlib/std/soul/i/
skylib_fluffos_v3/mudlib/std/soul/j/
skylib_fluffos_v3/mudlib/std/soul/k/
skylib_fluffos_v3/mudlib/std/soul/l/
skylib_fluffos_v3/mudlib/std/soul/n/
skylib_fluffos_v3/mudlib/std/soul/o/
skylib_fluffos_v3/mudlib/std/soul/q/
skylib_fluffos_v3/mudlib/std/soul/r/
skylib_fluffos_v3/mudlib/std/soul/u/
skylib_fluffos_v3/mudlib/std/soul/v/
skylib_fluffos_v3/mudlib/std/soul/y/
skylib_fluffos_v3/mudlib/std/soul/z/
skylib_fluffos_v3/mudlib/std/stationery/
skylib_fluffos_v3/mudlib/w/
skylib_fluffos_v3/mudlib/w/default/
skylib_fluffos_v3/mudlib/w/default/armour/
skylib_fluffos_v3/mudlib/w/default/clothes/
skylib_fluffos_v3/mudlib/w/default/item/
skylib_fluffos_v3/mudlib/w/default/npc/
skylib_fluffos_v3/mudlib/w/default/room/
skylib_fluffos_v3/mudlib/w/default/weapon/
skylib_fluffos_v3/mudlib/www/
skylib_fluffos_v3/mudlib/www/java/
skylib_fluffos_v3/mudlib/www/secure/
skylib_fluffos_v3/mudlib/www/secure/lpc/advanced/
skylib_fluffos_v3/mudlib/www/secure/lpc/intermediate/
skylib_fluffos_v3/win32/
/**
 * This is the vault inheritable object. There are two inheritables
 * (this one and /std/shops/vault.c) which are provided to make it
 * easy to setup your own vaults.  This object should be inherited
 * by the vault entrance area.  It is used to define most of the
 * customisation for the vault.
 *
 * You _must_ use set_vault_name and set_vault_entrance.  You must
 * also define a vault proprietor NPC using the 'proprietor' variable
 * to let the system know which NPC it is.  You should also check for
 * the proprietors location and existance every reset.  You may also
 * want to provide some protection to prevent the NPC from being
 * killed too frequently.
 *
 * @author Ceres
 * @see /std/shops/vault_entrance.c
 * @see /handlers/vault_handler.c
 * @change Mostly rewritten by Sandoz, 2002.
 */

#include <dirs.h>;

inherit ROOM_OBJ;

#define DEFAULT_VISIT_COST 1000
#define DEFAULT_OPEN_COST  18000

#define MS(x,y)     (string)MONEY_H->money_value_string(x,y)
#define PTS         proprietor->the_short()

string vault_room, vault_name, *sizes, vault_exit;
int open_cost, visit_cost;
object proprietor, unused;

object make_vault_room( object player );

/** @ignore yes */
void create() {
    ::create();

    if( base_name(TO) == __FILE__[0..<3] )
        return;

    if( !vault_name || vault_name == "") {
        error("No vault name set.\n");
        return;
    }

    if( !pointerp( sizes ) ) {
        error("No vault sizes set.\n");
        return;
    }

    VAULT_H->add_vault( vault_name, sizes );

    add_help_file("vault");

} /* create() */

/**
 * This function is used to set the location used for calculation of which
 * currency the vault proprietor will accept.
 * @param location the name of the location
 */
void set_location( string location ) { add_property("place", location ); }

/**
 * This method returns the location of the vault.
 * This is used to for calculation of which currency the
 * vault operates with.
 * @return the location of the place, or default if none is set
 */
string query_location() {
    string str;

    if( ( str = query_property("place") ) && str != "")
        return str;

    return "default";

} /* query_location() */

/**
 * This method sets the cost of opening an account with no
 * upkeep costs.
 * @param cost the cost of a new account with no upkeep costs
 */
void set_open_cost( int i ) { open_cost = i; }

/**
 * This method returns the opening cost of a vault with
 * no upkeep costs.
 * @return the cost of opening a vault account with
 * no upkeep costs
 */
int query_open_cost() { return open_cost || DEFAULT_OPEN_COST; }

/**
 * This method is used to set the cost of a visit for vaults
 * with no upkeep costs.
 * @param cost the cost of a vist
 */
void set_visit_cost( int i ) { visit_cost = i; }

/**
 * This method returns the visiting cost of vaults with
 * no upkeep costs.
 * @return the visiting cost of vaults with no upkeep costs
 */
int query_visit_cost() { return visit_cost || DEFAULT_VISIT_COST; }

/**
 * This method is used to set the name of the vault.
 * This should be a unique name for this vault, and a proper
 * name at that, ie. "Sandoz's Secret Stash", not "sandoz_vault".
 * @param str the name of the vault
 * @see /handlers/vault_handler->query_vault_names()
 */
void set_vault_name( string str ) { vault_name = str; }

/**
 * This method returns the name of the vault.
 * @return the name of the vault
 */
string query_vault_name() { return vault_name; }

/**
 * This method sets the available vault sizes for this vault.
 * The usable sizes are set in the vault handler, a list of
 * which can be gotten with VAULT_H->query_vault_sizes().
 * NOTE : "small" vaults are the ones without upkeep costs,
 * but with a visiting fee.
 * @param str the available vault size(s) in this vault
 * @see /handlers/vault_handler->query_vault_sizes()
 * @example
 *     set_vault_sizes("small");
 *     set_vault_sizes( ({"small", "large"}) );
 */
void set_vault_sizes( mixed str ) {
    if( stringp(str) )
        sizes = ({ str });
    else if( pointerp(str) )
        sizes = str;
    else
        printf("The argument to set_vault_sizes() must be either a string or "
            "an array of strings.");
} /* set_vault_sizes() */

/**
 * This method can be used to assign a proprietor NPC to the
 * proprietor variable.
 * @param ob the proprietor NPC object
 */
void set_proprietor( object ob ) { proprietor = ob; }

/**
 * Used to set the exit from this vault entrance room into the vault itself.
 * The parameters are just like those of add_exit, except that you cannot
 * use a 'door' or 'gate' type exits here.
 * @param direction the direction of the exit
 * @param dest the destination of the vault exit
 * @param type the exit type as in add_exit
 * @see add_exit
 */
void set_vault_exit( string direc, mixed dest, string type ) {
    vault_room = dest;
    vault_exit = direc;
    add_exit( direc, (: make_vault_room :), type );
    modify_exit( direc, ({"function", "check_customer", "no follow", 1 }) );
} /* set_vault_exit() */

/** @ignore yes */
object make_vault_room( object thing ) {
    string owner;

    if( thing && unused && ( owner = unused->query_owner() ) &&
        owner == thing->query_name() )
        return unused;

    return 0;

} /* make_vault_room() */

/** @ignore yes */
int check_customer( string verb, object thing, string special ) {
    int cost;
    string name, place;

    if( !thing || thing == proprietor )
        return 0;

    if( !proprietor || ENV(proprietor) != TO ) {
        tell_object( thing, "The vault is closed since the proprietor is "
            "missing.\n");
        return notify_fail("");
    }

    if( proprietor->is_fighting(thing) ) {
        proprietor->do_command("peer "+file_name(thing) );
        proprietor->do_command("lsay No way am I letting you in!");
        return notify_fail("");
    }

    name = (string)thing->query_name();
    place = (string)query_location();

    if( !VAULT_H->query_account_in( vault_name, name ) ) {
        tell_room( TO, PTS+" intercepts "+(string)thing->one_short()+".\n");
        proprietor->do_command("'You have not rented any vault space here.");
        if( interactive(thing) ) {
            proprietor->do_command("'The prices of renting our vaults in "
                "different sizes are the following.");
            proprietor->do_command("'"+VAULT_H->query_pricing( vault_name,
                place, query_open_cost(), query_visit_cost() ) );
        }
        return notify_fail("");
    }

    cost = VAULT_H->query_visit_cost( vault_name, name, query_visit_cost() );

    if( cost && (int)thing->query_value_in( place ) < cost ) {
        tell_room( TO, PTS+" intercepts "+(string)thing->one_short()+".\n");
        proprietor->do_command("'It costs "+
            MS( query_visit_cost(), place )+" for you to use the "
            "facility!");
        return notify_fail("");
    }

    if( cost ) {
        thing->pay_money( MONEY_H->create_money_array( cost, place ), place );
        tell_object( thing, "You pay "+PTS+" who waves you through.\n");
        tell_room( TO, (string)thing->the_short()+" pays "+PTS+" who waves "+
            (string)thing->HIM+" through.\n", thing );
    } else {
        tell_room( TO, PTS+" waves "+thing->the_short()+" through.\n");
    }

    if( !unused = clone_object(vault_room) ) {
        tell_object( thing, "Something has gone wrong with your vault room, "
            "please contact a creator immediately.\n");
        return notify_fail("");
    }

    unused->setup_vault( vault_name, thing );
    VAULT_H->event_visit( vault_name, name );

    return 1;

} /* check_customer() */

/** @ignore yes */
int do_open_check() {
    if( !proprietor || ENV(proprietor) != TO ) {
        add_failed_mess("The vault is closed since the proprietor is "
                        "missing.\n");
        return 0;
    }

    add_succeeded_mess("");
    return 1;

} /* do_open_check() */

/** @ignore yes */
int do_rent( string size ) {
    if( !do_open_check() )
        return 0;

    tell_object( TP, "You enquire "+PTS+" about renting some vault space.\n");
    tell_room( TO, TP->the_short()+" $V$0=enquires,enquire$V$ about "
        "renting some vault space.\n", TP );

    return VAULT_H->do_rent( vault_name, size, proprietor, query_location(),
        query_open_cost(), query_visit_cost() );

} /* do_rent() */

/** @ignore yes */
int do_pay( int i ) {
    if( !do_open_check() )
        return 0;

    tell_object( TP, "You enquire "+PTS+" about paying rent for your vault "
        "space.\n");
    tell_room( TO, TP->the_short()+" $V$0=enquires,enquire$V$ about "
        "paying rent for "+verbalize("their vault accounts",
        TP->HIS+" vault account")+".\n", TP );

    return VAULT_H->do_pay( vault_name, i, proprietor, query_location() );

} /* do_pay() */

/** @ignore yes */
int do_switch( string size ) {
    if( !do_open_check() )
        return 0;

    tell_object( TP, "You enquire "+PTS+" about changing your vault size.\n");
    tell_room( TO, TP->the_short()+" $V$0=enquires,enquire$V$ about "
        "changing "+verbalize("their vault sizes",
        TP->HIS+" vault size")+".\n", TP );

    return VAULT_H->do_switch( vault_name, size, proprietor, query_location(),
        query_open_cost(), query_visit_cost() );

} /* do_switch() */

/** @ignore yes */
int do_check_rent() {
    if( !do_open_check() )
        return 0;

    tell_object( TP, "You enquire "+PTS+" about the rent for your vault "
        "space.\n");
    tell_room( TO, TP->the_short()+" $V$0=enquires,enquire$V$ about "
        "the rent for "+verbalize("their vault spaces",
        TP->HIS+" vault space")+".\n", TP );

    return VAULT_H->do_check_rent( vault_name, proprietor );

} /* do_check_rent() */

/** @ignore yes */
int do_check_prices() {
    TP->more_string("The pricing of our vaults is the following:\n"+
    VAULT_H->query_pricing( vault_name, query_location(),
        query_open_cost(), query_visit_cost(), 1 ), "vault prices");
    return 1;
} /* do_check_prices() */

/** @ignore yes */
void init() {
    string str;

    ::init();

    str = "{"+implode( sizes, "|")+"}";

    add_command("switch", "vault size to "+str, (: do_switch($4[0]) :) );
    add_command("change", "vault size to "+str, (: do_switch($4[0]) :) );
    add_command("rent", "[a] {"+implode( sizes, "|")+"} vault",
        (: do_rent($4[0]) :) );
    add_command("pay", "rent for <number> months", (: do_pay($4[0]) :) );
    add_command("check", "[my] rent", (: do_check_rent() :) );
    add_command("check", "prices", (: do_check_prices() :) );

} /* init() */

/** @ignore yes */
void player_quitting( object who, object env ) {
} /* player_quitting() */

/** @ignore yes */
void do_clean( object room ) {
    object *inv, *liv, ob;
    string prop;

    if( !room )
        return;

    if( sizeof( inv = INV(room) ) ) {
        prop = ( proprietor && ENV(proprietor) == TO ?
                 proprietor->the_short() : "a vault assistant");

        liv = filter( inv, (: living($1) :) );

        if( sizeof(liv) ) {
            inv -= liv;
            foreach( ob in liv ) {
                tell_object( ob, prop+" drags you out of the vault.\n");
                ob->move_with_look( TO,
                    prop+" drags $N out from one of the vaults.",
                    prop+" drags $N out of the vault.");
            }
        }

        if( sizeof(inv) ) {
            inv->move(TO);
            tell_room( TO, prop+" drags "+query_multiple_short(inv)+" out "
                "from one of the vaults.\n");
        }

        if( sizeof( INV(room) ) ) {
            tell_creator("sandoz", "Unmovable stuff in vault : %s",
                file_name(room) );
            return;
        }
    }

    room->dest_me();

} /* do_clean() */

/** @ignore yes */
mixed stats() {
    return ::stats() + ({
        ({"vault name", vault_name }),
        ({"vault sizes", implode( sizes, ", ") }),
        ({"open cost", query_open_cost() }),
        ({"visit cost", query_visit_cost() }),
    });
} /* stats() */