|
|
[Package Index | Mudlib Index | Effect Index]
File /std/container.c
The basic container inheritable, please note this is *not* a container
like a bucket. This now allows things inside the container to
inform us that they should be used as part of the inventory of this
object. This means the contents of containers will look like they
are not inside containers to the outside world.See also: /obj/container.c, /obj/baggage.c, /obj/vessel.c and /obj/clothing.c
Written by Pinkfish Inherits
This class inherits the following classes /std/basic/cute_look.c, /std/basic/export_inventory.c, /global/auto_load.c and /std/object.cIncludes
This class includes the following files /include/player.h, /include/playtesters.h, /include/player_handler.h and /include/move_failures.hMethod index
- add_tracked_items(int)
This method handles the addition of tracked items.
- add_weight(int)
This method is called in the move functions, it adds extra
weight onto the object when something is moved inside it.
- can_find_match_recurse_into(object)
This method allows the container to have stuff inside it checked.
- can_find_match_reference_inside_object(object, object)
This method checks to see if the find match code can actually
reference this object inside us.
- disable_item_tracking()
This method disables item tracking
- do_restore_inventory_error(object, int)
This method handles the case where the return of the move flag is not
MOVE_OK.
- enable_item_tracking()
This method enables item tracking
- event_container_move(object, mixed, mixed)
This method handles the movement of the containers of this object.
- event_move_object(mixed, mixed)
This method is called from move to notify any tracked items contained of
the move using event_container_moved.
- find_inv_match(string, object)
This method finds the matching objects inside this object
that are visible to the looker.
- handle_restore_inventory(object)
This method handles moving objects into the inventory from an auto
load.
- query_complete_weight()
This method returns the complete weight of the object.
- query_fullness(int)
This method returns the fullness of the container based on a number
from 0 to the passed in number.
- query_loc_weight()
This method returns the current local weight in this
container.
- query_max_items()
This method returns the maximum number of items that can
be carried in this container.
- query_max_weight()
This method returns the maximum amount of weight that can
be carried in this container.
- query_ownership()
This returns who owns the container, if it set to 0 then no one
owns it.
- query_player()
This method returns the player who is loading the container
during the autoload sequence.
- query_prevent_insert()
If this is true, this container cannot be put into other containers.
- query_tracked_items()
This method returns the number of tracked item contained.
- remove_tracked_items(int)
This method handles the removal of tracked items.
- reset_prevent_insert()
This allows this container to be put into other containers (default).
- set_max_items(int)
This method sets the maximum number of items that can
be carried in this container.
- set_max_weight(int)
This method sets the maximum amount of weight that can
be carried in this container.
- set_ownership(string)
This sets who owns the container, if it set to 0 then no one
owns it.
- set_player(object)
This method is used in the auto loading sequence to set the
player who is loading the container.
- set_prevent_insert()
items21 stops this container from being put into other containers.
- set_tracked_item_status_reason(string)
This method is called to adjust the status reason.
- test_add(object, int)
This method allows things to be added into us.
- test_item_limit(int)
This method verifies to make sure that the max item container limit
is not broken.
- test_remove(object, int, mixed)
This method checks to see if the object can be taken out of
us.
- update_loc_weight()
This method determins the current local weight from all the
objects inside the container
Public Functions
These are functions that everyone can access.
.
nomask void add_tracked_items(int n_items)
This method handles the addition of tracked items.
Tracked items want to be notified if the container moves.
- Parameters:
n_items - the number of tracked items added
- See also:
remove_tracked_items.c and event_container_move
.c
int add_weight(int n)
This method is called in the move functions, it adds extra
weight onto the object when something is moved inside it.
|