Goonstation 13 - Modules - TypesVar Details - Proc Details

/datum/storage

a datum for atoms that allows holdable storage of items in a hud

Vars

can_holdTypes that can be held
can_hold_exactExact types that can be held, in addition to can_hold, if it has types
check_wclassIf set, if can_hold is used, an item not in can_hold or can_hold_exact can fit in the storage if its weight is low enough
hudStorage hud attached to the storage
linked_itemThe storage item linked to this datum
max_wclassMaximum w_class that can be held
move_triggeredDoes moving the linked storage item cause anything to happen to stored items
opens_if_wornPrevent accessing storage when clicked when worn, ex. in pocket
prevent_holdingTypes that have a w_class holdable but that the storage will not hold
slotsNumber of storage slots, even numbers overlap the close button for the on-ground hud layout
sneakyDon't print a visible message on use
stealthy_storageDon't show the contents of the storage on its description
stored_itemsAll items stored

Procs

add_contentswhen adding an item in
add_contents_extraavailable if add_contents needs to be overridden
add_contents_safeuse this versus add_contents() if you also want extra safety checks
check_can_holdcheck if the storage can hold an item or not
get_all_contentsreturn recursive search of all contents
get_capacity_stringreturn outputtable capacity
get_contentsreturn stored contents
get_hud_contentsreturn contents that can be seen in the hud
get_visible_slotsreturn number of visible slots in the hud
hide_hudhide storage
hud_can_addif an item can be added by clicking it on the visible hud
hud_shownif user sees the storage hud
is_fullstorage is full or not
make_my_stuffcreates initial contents in the storage
mousetrap_checkwhen reaching inside the storage item, check for traps
show_hudshow storage contents
storage_emp_actemping storage emps everything inside
storage_item_after_attackafter attacking an object with the storage item
storage_item_attack_bywhen clicking the storage item with an object
storage_item_attack_handwhen clicking the storage item with an empty hand
storage_item_attack_selfusing storage item in hand
storage_item_mouse_dropstorage item is mouse dropped onto something
storage_item_move_triggeredstorage item moving triggers a movement of items inside
storage_item_on_dropstorage item is dropped
transfer_stored_itemwhen transfering something in the storage out
transfer_stored_item_extrafor use if transfer_stored_item is overridden

Var Details

can_hold

Types that can be held

can_hold_exact

Exact types that can be held, in addition to can_hold, if it has types

check_wclass

If set, if can_hold is used, an item not in can_hold or can_hold_exact can fit in the storage if its weight is low enough

hud

Storage hud attached to the storage

linked_item

The storage item linked to this datum

max_wclass

Maximum w_class that can be held

move_triggered

Does moving the linked storage item cause anything to happen to stored items

opens_if_worn

Prevent accessing storage when clicked when worn, ex. in pocket

prevent_holding

Types that have a w_class holdable but that the storage will not hold

slots

Number of storage slots, even numbers overlap the close button for the on-ground hud layout

sneaky

Don't print a visible message on use

stealthy_storage

Don't show the contents of the storage on its description

stored_items

All items stored

Proc Details

add_contents

when adding an item in

add_contents_extra

available if add_contents needs to be overridden

add_contents_safe

use this versus add_contents() if you also want extra safety checks

check_can_hold

check if the storage can hold an item or not

get_all_contents

return recursive search of all contents

get_capacity_string

return outputtable capacity

get_contents

return stored contents

get_hud_contents

return contents that can be seen in the hud

get_visible_slots

return number of visible slots in the hud

hide_hud

hide storage

hud_can_add

if an item can be added by clicking it on the visible hud

hud_shown

if user sees the storage hud

is_full

storage is full or not

make_my_stuff

creates initial contents in the storage

mousetrap_check

when reaching inside the storage item, check for traps

show_hud

show storage contents

storage_emp_act

emping storage emps everything inside

storage_item_after_attack

after attacking an object with the storage item

storage_item_attack_by

when clicking the storage item with an object

storage_item_attack_hand

when clicking the storage item with an empty hand

storage_item_attack_self

using storage item in hand

storage_item_mouse_drop

storage item is mouse dropped onto something

storage_item_move_triggered

storage item moving triggers a movement of items inside

storage_item_on_drop

storage item is dropped

transfer_stored_item

when transfering something in the storage out

transfer_stored_item_extra

for use if transfer_stored_item is overridden