/tg/ Station 13 - Modules - TypesVar Details - Proc Details

storage

Datumized Storage Eliminates the need for custom signals specifically for the storage component, and attaches a storage variable (atom_storage) to every atom. The parent and real_location variables are both weakrefs, so they must be resolved before they can be used. If you're looking to create custom storage type behaviors, check ../subtypes

Vars

allow_big_nestingwhether or not we allow storage objects of the same size inside
allow_quick_emptyshow we allow emptying all contents by using the storage object in hand
allow_quick_gathershould we be allowed to pickup an object by clicking it
animatedwhether or not we should have those cute little animations
attack_hand_interactwhether or not we should open when clicked
boxesstorage display object
can_holdif this is set, only items, and their children, will fit
can_hold_descriptionshows what we can hold in examine text
can_hold_traitif set can only contain stuff with this single trait present.
cant_holdif this is set, items, and their children, won't fit
closerclose button object
collection_modethe mode for collection when allow_quick_gather is enabled
emp_shieldedcontents shouldn't be emped
exception_holdif set, these items will be the exception to the max size of object that can fit.
insert_prepositionyou put things in a bag, but on a plate
is_usinglist of all the mobs currently viewing the contents
max_specific_storagemax weight class for a single item being inserted
max_total_storagemax combined weight classes the storage can hold
numerical_stackinginstead of displaying multiple items of the same type, display them as numbered contents
parentthe actual item we're attached to
quickdrawalt click takes an item out instead of opening up storage
real_locationthe actual item we're storing in
rustle_soundplay a rustling sound when interacting with the bag
screen_max_columnsmaximum amount of columns a storage object can have
screen_pixel_xpixel location of the boxes and close button
screen_start_xwhere storage starts being rendered, screen_loc wise
silentdon't show any chat messages regarding inserting items

Procs

animate_parentGives a spiffy animation to our parent to represent opening and closing.
attackbySignal handler for whenever we're attacked by an object.
attempt_insertAttempts to insert an item into the storage
attempt_removeAttempts to remove an item from the storage
can_insertChecks if an item is capable of being inserted into the storage
can_see_contentsChecks who is currently capable of viewing our storage (and is.)
close_allClose the storage UI for everyone viewing us.
close_distanceSignal handler for whenever a mob walks away with us, close if they can't reach us.
collect_on_turfCollects every item of a type on a turf.
dump_content_atDumps all of our contents at a specific location.
emp_actSignal handler for the emp_act() of all contents
generate_hold_descGenerates a description, primarily for clothing storage.
handle_attackSignal handler for whenever we're attacked by a mob.
handle_enterAutomatically ran on all object insertions: flag marking and view refreshing.
handle_exitAutomatically ran on all object removals: flag marking and view refreshing.
handle_mass_pickupInserts every time in a given list, with a progress bar
handle_mass_transferUsed to transfer all the items inside of us to another atom
hide_contentsHide our storage from a mob.
intercept_preattackSignal handler for preattack from an object.
item_insertion_feedbackProvides visual feedback in chat for an item insertion
mass_emptySignal handler for remove_all()
mousedrop_ontoSignal handler for whenever we drag the storage somewhere.
mousedropped_ontoSignal handler for whenever something gets mouse-dropped onto us.
open_storageSignal handler for when we're showing ourselves to a mob.
open_storage_attackby_secondarySignal handler for when we get attacked with secondary click by an item.
open_storage_secondarySignal handler for when we get attacked with secondary click.
orient_item_boxesGenerates the actual UI objects, their location, and alignments whenever we open storage up.
orient_to_hudUpdates the storage UI to fit all objects inside storage.
process_numerical_displayGenerates the numbers on an item in storage to show stacking.
put_in_hands_asyncAsync version of putting something into a mobs hand.
refresh_viewsRefresh the views of everyone currently viewing the storage.
remove_allRemoves everything inside of our storage
remove_and_refreshResets an object, removes it from our screen, and refreshes the view.
remove_typeRemoves only a specific type of item from our storage
reset_itemRefreshes and item to be put back into the real world, out of storage.
return_invRecursive proc to get absolutely EVERYTHING inside a storage item, including the contents of inner items.
set_real_locationSets where items are physically being stored in the case it shouldn't be on the parent.
show_contentsShow our storage to a mob.
toggle_collection_modeToggles the collectmode of our storage.
update_actionsUpdates the action button for toggling collectmode.

Var Details

allow_big_nesting

whether or not we allow storage objects of the same size inside

allow_quick_empty

show we allow emptying all contents by using the storage object in hand

allow_quick_gather

should we be allowed to pickup an object by clicking it

animated

whether or not we should have those cute little animations

attack_hand_interact

whether or not we should open when clicked

boxes

storage display object

can_hold

if this is set, only items, and their children, will fit

can_hold_description

shows what we can hold in examine text

can_hold_trait

if set can only contain stuff with this single trait present.

cant_hold

if this is set, items, and their children, won't fit

closer

close button object

collection_mode

the mode for collection when allow_quick_gather is enabled

emp_shielded

contents shouldn't be emped

exception_hold

if set, these items will be the exception to the max size of object that can fit.

insert_preposition

you put things in a bag, but on a plate

is_using

list of all the mobs currently viewing the contents

max_specific_storage

max weight class for a single item being inserted

max_total_storage

max combined weight classes the storage can hold

numerical_stacking

instead of displaying multiple items of the same type, display them as numbered contents

parent

the actual item we're attached to

quickdraw

alt click takes an item out instead of opening up storage

real_location

the actual item we're storing in

rustle_sound

play a rustling sound when interacting with the bag

screen_max_columns

maximum amount of columns a storage object can have

screen_pixel_x

pixel location of the boxes and close button

screen_start_x

where storage starts being rendered, screen_loc wise

silent

don't show any chat messages regarding inserting items

Proc Details

animate_parent

Gives a spiffy animation to our parent to represent opening and closing.

attackby

Signal handler for whenever we're attacked by an object.

attempt_insert

Attempts to insert an item into the storage

@param datum/source used by the signal handler @param obj/item/to_insert the item we're inserting @param mob/user the user who is inserting the item @param override see item_insertion_feedback() @param force bypass locked storage

attempt_remove

Attempts to remove an item from the storage

@param obj/item/thing the object we're removing @param atom/newLoc where we're placing the item @param silent if TRUE, we won't play any exit sounds

can_insert

Checks if an item is capable of being inserted into the storage

@param obj/item/to_insert the item we're checking @param messages if TRUE, will print out a message if the item is not valid @param force bypass locked storage

can_see_contents

Checks who is currently capable of viewing our storage (and is.)

close_all

Close the storage UI for everyone viewing us.

close_distance

Signal handler for whenever a mob walks away with us, close if they can't reach us.

collect_on_turf

Collects every item of a type on a turf.

@param obj/item/thing the initial object to pick up @param mob/user the user who is picking up the items

dump_content_at

Dumps all of our contents at a specific location.

@param atom/dest_object where to dump to @param mob/user the user who is dumping the contents

emp_act

Signal handler for the emp_act() of all contents

generate_hold_desc

Generates a description, primarily for clothing storage.

handle_attack

Signal handler for whenever we're attacked by a mob.

handle_enter

Automatically ran on all object insertions: flag marking and view refreshing.

handle_exit

Automatically ran on all object removals: flag marking and view refreshing.

handle_mass_pickup

Inserts every time in a given list, with a progress bar

@param mob/user the user who is inserting the items @param list/things the list of items to insert @param atom/thing_loc the location of the items (used to make sure an item hasn't moved during pickup) @param list/rejections a list used to make sure we only complain once about an invalid insertion @param datum/progressbar/progress the progressbar used to show the progress of the insertion

handle_mass_transfer

Used to transfer all the items inside of us to another atom

@param mob/user the user who is transferring the items @param atom/going_to the atom we're transferring to @param override enable override on attempt_insert

hide_contents

Hide our storage from a mob.

@param mob/toshow the mob to hide the storage from

intercept_preattack

Signal handler for preattack from an object.

item_insertion_feedback

Provides visual feedback in chat for an item insertion

@param mob/user the user who is inserting the item @param obj/item/thing the item we're inserting @param override skip feedback, only do animation check

mass_empty

Signal handler for remove_all()

mousedrop_onto

Signal handler for whenever we drag the storage somewhere.

mousedropped_onto

Signal handler for whenever something gets mouse-dropped onto us.

open_storage

Signal handler for when we're showing ourselves to a mob.

open_storage_attackby_secondary

Signal handler for when we get attacked with secondary click by an item.

open_storage_secondary

Signal handler for when we get attacked with secondary click.

orient_item_boxes

Generates the actual UI objects, their location, and alignments whenever we open storage up.

orient_to_hud

Updates the storage UI to fit all objects inside storage.

process_numerical_display

Generates the numbers on an item in storage to show stacking.

put_in_hands_async

Async version of putting something into a mobs hand.

refresh_views

Refresh the views of everyone currently viewing the storage.

remove_all

Removes everything inside of our storage

@param atom/target where we're placing the item

remove_and_refresh

Resets an object, removes it from our screen, and refreshes the view.

@param atom/movable/gone the object leaving our storage

remove_type

Removes only a specific type of item from our storage

@param type the type of item to remove @param amount how many we should attempt to pick up at one time @param check_adjacent if TRUE, we'll check adjacent locations for the item type @param force if TRUE, we'll bypass the check_adjacent check all together @param mob/user the user who is removing the items @param list/inserted a list passed to attempt_remove for ultimate removal

reset_item

Refreshes and item to be put back into the real world, out of storage.

return_inv

Recursive proc to get absolutely EVERYTHING inside a storage item, including the contents of inner items.

@param list/interface the list we're adding objects to @param recursive whether or not we're checking inside of inner items

set_real_location

Sets where items are physically being stored in the case it shouldn't be on the parent.

@param atom/real the new real location of the datum @param should_drop if TRUE, all the items in the old real location will be dropped

show_contents

Show our storage to a mob.

@param mob/toshow the mob to show the storage to

toggle_collection_mode

Toggles the collectmode of our storage.

@param mob/toshow the mob toggling us

update_actions

Updates the action button for toggling collectmode.