/
LIB3/
LIB3/D/ADMIN/
LIB3/D/ADMIN/OBJ/
LIB3/D/ADMIN/ROOM/W/
LIB3/D/HOME/
LIB3/D/HOME/CITY/ARENA/
LIB3/D/HOME/CITY/ITEMS/
LIB3/D/HOME/CITY/POSTOFFI/
LIB3/DOC/
LIB3/GLOBAL/SPECIAL/
LIB3/GLOBAL/VIRTUAL/
LIB3/NET/
LIB3/NET/CONFIG/
LIB3/NET/DAEMON/CHARS/
LIB3/NET/GOPHER/
LIB3/NET/INHERIT/
LIB3/NET/OBJ/
LIB3/NET/SAVE/
LIB3/NET/VIRTUAL/
LIB3/OBJ/B_DAY/
LIB3/OBJ/HANDLERS/TERM_TYP/
LIB3/PLAYERS/B/
LIB3/PLAYERS/N/
LIB3/ROOM/
LIB3/SAVE/
LIB3/SAVE/BOARDS/
LIB3/SAVE/ENVIRON/
LIB3/SAVE/POST/
LIB3/STD/COMMANDS/SHADOWS/
LIB3/STD/CREATOR/
LIB3/STD/DOM/
LIB3/STD/EFFECTS/
LIB3/STD/EFFECTS/HEALING/
LIB3/STD/EFFECTS/OTHER/
LIB3/STD/EFFECTS/POISONS/
LIB3/STD/ENVIRON/
LIB3/STD/GUILDS/
LIB3/STD/LIQUIDS/
LIB3/STD/ROOM/
LIB3/STD/TRIGGER/SHADOW/
LIB3/W/
LIB3/W/BANNOR/
LIB3/W/NEWSTYLE/
#pragma save_binary

/* formatting inventories for player, monster and corpse contents */

/* self true if inventory, else an examine. */

string  query_living_contents( int self )
{
    string  s, t, *strs;
    object  obj, *objs, *conts;
    int     i, col;

    strs = ({ });

    conts = all_inventory( this_object() );
    for( i = 0; i < sizeof( conts ); i++ )
	if( !conts[ i ] || !(s = (string)conts[ i ]->short())||(s == "") )
	    conts -= ({ conts[ i ] });

    obj = (object)this_object()->query_weapon();
    if( obj )
    {
	strs += ({ "Wielding: ", ( string ) obj->short( 0 ) + ".\n" });

	conts -= ({ obj });
    }
    obj = (object)this_object()->query_held_ob();
    if( obj )
    {
	strs += ({ "Holding : ", ( string ) obj->short( 0 ) + ".\n" });

	conts -= ({ obj });
    }
    objs = (object *)this_object()->query_armours();
    if( sizeof( objs ) )
	if( s = query_multiple_short( objs ) )
	    strs += ({ "Wearing : ", s + ".\n" });
    obj = present( "Some Money For Me", this_object() );
    conts -= objs + ({ obj }) +
	(object *)this_object()->query_labels();

    if( sizeof( conts ) )
	if( s = (string)this_object()->query_contents( 0, conts ) )
	    strs += ({ "Carrying: ", s });

    s = "";
    col = (int)this_player()->query_cols() - 11;
    for( i = 0; i < sizeof( strs ); i += 2 )
	s += sprintf( "%s%-=*s", strs[ i ], col, strs[ i + 1 ] );
    if( self )
    {
	if( obj )
	    t = (string)obj->short( 0 );

	else
	    t = 0;
	if( !sizeof( strs ) )
	    s = "You are empty handed.\n";
	s += "Your purse contains " + (t ? t : "only moths") + ".\n";
    }
    else
	if( obj )
	{
	    i = (int)obj->query_number_coins();
	    s += capitalize( (string)this_object()->query_possessive() ) + " purse is ";
	    switch( i )
	    {
		case 0..10:
		    s += "home to only moths!\n";
		    break;
		case 11..100:
		    s += "tinkling with coins.\n";
		    break;
		case 101..300:
		    s += "bulging with coins.\n";
		    break;
		default:
		    s += "fit to burst!\n";
	    }
	}
    return s;
}