Space Station 13 - Modules - TypesVar Details - Proc Details

storage

Vars

allow_quick_emptySet this variable to allow the object to have the 'empty' verb, which dumps all the contents on the floor.
allow_quick_gatherSet this variable to allow the object to have the 'toggle mode' verb, which quickly collects all items from a tile.
can_holdList of objects which this item can store (if set, it can't store anything else)
cant_holdList of objects which this item can't store (in effect only if can_hold isn't set)
cant_hold_overrideList of objects which this item overrides the cant_hold list (used to negate cant_hold on specific items. Ex: Allowing Smuggler's Satchels (subtype of backpack) to be stored inside bags of holding.)
display_contents_with_numberSet this to make the storage item group contents of the same type and display them as a number.
foldableWhat kind of /obj/item/stack can this be folded into. (e.g. Boxes and cardboard)
foldable_amtHow much of the stack item do you get.
max_combined_w_classThe sum of the w_classes of all the items in this storage item.
max_w_classMax size of objects that this object can store (in effect only if can_hold isn't set)
mobs_viewingLazy list of mobs which are currently viewing the storage inventory.
pickup_all_on_tilePick up one item at a time or everything on the tile
silentNo message on putting items in.
storage_slotsThe number of storage slots in this container.
use_soundSound played when used. null for no sound.
use_to_pickupSet this to make it possible to use this item in an inverse way, so you can have the item in your hand and click items on the floor to pick them up.
w_class_overrideList of objects that can be stored, regardless of w_class

Procs

can_be_insertedChecks whether I can be inserted into the container.
handle_item_insertionHandles items being inserted into a storage container.
hide_fromHides the current container interface from user.
hide_from_allHides the current container interface from all viewers.
orient_objsDraws the inventory and places the items on it using custom positions.
populate_contentsPopulates the container with items
remove_from_storageHandles the removal of an item from a storage container.
return_invLoops through any nested containers inside src, and returns a list of everything inside them.
show_toShows user the contents of src, and activates any mouse trap style triggers.
update_viewersChecks all mobs currently viewing the storage inventory, and hides it if they shouldn't be able to see it.

Var Details

allow_quick_empty

Set this variable to allow the object to have the 'empty' verb, which dumps all the contents on the floor.

allow_quick_gather

Set this variable to allow the object to have the 'toggle mode' verb, which quickly collects all items from a tile.

can_hold

List of objects which this item can store (if set, it can't store anything else)

cant_hold

List of objects which this item can't store (in effect only if can_hold isn't set)

cant_hold_override

List of objects which this item overrides the cant_hold list (used to negate cant_hold on specific items. Ex: Allowing Smuggler's Satchels (subtype of backpack) to be stored inside bags of holding.)

display_contents_with_number

Set this to make the storage item group contents of the same type and display them as a number.

foldable

What kind of /obj/item/stack can this be folded into. (e.g. Boxes and cardboard)

foldable_amt

How much of the stack item do you get.

max_combined_w_class

The sum of the w_classes of all the items in this storage item.

max_w_class

Max size of objects that this object can store (in effect only if can_hold isn't set)

mobs_viewing

Lazy list of mobs which are currently viewing the storage inventory.

pickup_all_on_tile

Pick up one item at a time or everything on the tile

silent

No message on putting items in.

storage_slots

The number of storage slots in this container.

use_sound

Sound played when used. null for no sound.

use_to_pickup

Set this to make it possible to use this item in an inverse way, so you can have the item in your hand and click items on the floor to pick them up.

w_class_override

List of objects that can be stored, regardless of w_class

Proc Details

can_be_inserted

Checks whether I can be inserted into the container.

Returns TRUE if it can, and FALSE if it can't. Arguments:

handle_item_insertion

Handles items being inserted into a storage container.

This doesn't perform any checks of whether an item can be inserted. That's done by /obj/item/storage/proc/can_be_inserted Arguments:

hide_from

Hides the current container interface from user.

hide_from_all

Hides the current container interface from all viewers.

orient_objs

Draws the inventory and places the items on it using custom positions.

tx and ty are the upper left tile. mx and my are the bottom right tile.

The numbers are calculated from the bottom left, with the bottom left being 1,1.

populate_contents

Populates the container with items

Override with whatever you want to put in the container

remove_from_storage

Handles the removal of an item from a storage container.

Arguments:

return_inv

Loops through any nested containers inside src, and returns a list of everything inside them.

Currently checks for storage containers, gifts containing storage containers, and folders.

show_to

Shows user the contents of src, and activates any mouse trap style triggers.

update_viewers

Checks all mobs currently viewing the storage inventory, and hides it if they shouldn't be able to see it.