[Package Index | Mudlib Index | Effect Index]
File /std/living/carrying.c
This file contains all the code need to handle the types of carrying
which npcs tend to involve themselves in.Written by Pinkfish
Includes
This class includes the following files /include/money.h, /include/clothing.h, /include/shops/bank.h, /include/player.h and /include/playtesters.hMethod index
- armour_list(object *, int, int)
This method returns a string list of the armours which the player
is wearing.
- query_living_contents(int, int)
This method does the inventory of the living objects we all know and
love.
- query_types_worn(object *)
This method returns the list of types of things which are passed into
the array.
- query_visible_armours()
This method returns all the visible clothing types on the specified player,
so you cannot get at stuff that is covered up.
- query_wearing_hidden(object, object *, int)
This method returns the items that are hidden by something on top of
them.
Public Functions
These are functions that everyone can access.
-
query_living_contents
string query_living_contents(int self,
int inv_type)
This method does the inventory of the living objects we all know and
love. It is used in the long description and the inventory commands.
- Parameters:
self - are we showing our own inventory
inv_type - what sort of things we are displaying, 0 is the default
- See also:
armour_list()
-
query_visible_armours
object * query_visible_armours()
This method returns all the visible clothing types on the specified player,
so you cannot get at stuff that is covered up.
- Returns:
the visible clothing items
-
query_wearing_hidden
varargs object * query_wearing_hidden(object looker,
object * things,
int use_transparent)
This method returns the items that are hidden by something on top of
them.
- Parameters:
looker - the person looking at the items
things - an optional set of things
use_transparent - - ignore transparent items when looking for hiding items.
- Returns:
the hidden worn types
Protected Functions
These are functions that only objects inheriting the class can access.
-
armour_list
string armour_list(object * things,
int hidden_only,
int self)
This method returns a string list of the armours which the player
is wearing. It will show also modify the list to show only hidden
items (items under other items are considered hidden).
- Parameters:
things - the things to get the list of armours from
hidden_only - only show the list of hidden objects
- See also:
query_types_worn() and query_living_contents()
-
query_types_worn
varargs string * query_types_worn(object * things)
This method returns the list of types of things which are passed into
the array.
Two elements in an array is returned, the first element is the list of
all of the different types which are worn and the second is the list
of types corresponding to each of the inputs.
- Parameters:
things - the things to check
- Returns:
a two element array
- See also:
armour_list()