storage
This contains what previously was known as stored_start, stored_continue, and stored_end
Vars | |
can_hold_skill | Special can_holds that require a skill to insert, it is an associated list of typepath = list(skilltype, skilllevel) |
---|---|
can_hold_skill_only | Dictates whether or not we only check for items in can_hold_skill rather than can_hold or free usage |
required_skill_for_nest_opening | The required skill for opening this storage if it is inside another storage type |
required_skill_level_for_nest_opening | The required level of a skill for opening this storage if it is inside another storage type |
Procs | |
_item_insertion | Inserts the item. Separate proc because handle_item_insertion isn't guaranteed to insert and it therefore isn't safe to override it before calling parent. Updates icon when done. Can be called directly but only if the item was spawned inside src - handle_item_insertion is safer. W is always an item. stop_warning prevents messaging. user may be null. |
_item_removal | Separate proc because remove_from_storage isn't guaranteed to finish. Can be called directly if the target atom exists and is an item. Updates icon when done. |
handle_item_insertion | Handler for inserting items. It does not perform any checks of whether an item can or can't be inserted into the storage item. That's done by can_be_inserted(). Its checks are whether the item exists, is an item, and (if it's held by a mob) the mob can drop it. The stop_warning parameter will stop the insertion message from being displayed. It is intended for cases where you are inserting multiple items at once, such as when picking up all the items on a tile with one click. user can be null, it refers to the potential mob doing the insertion. |
has_room | Returns TRUE if there is room for the given item. W_class_override allows checking for just a generic W_class, meant for checking shotgun handfuls without having to spawn and delete one just to check. |
hide_from | Used to hide the storage's inventory screen. |
post_skin_selection | Things to be done after selecting a map skin (if any) and before adding inventory and updating icon for the first time. Most likely saving basic icon state. |
remove_from_storage | Call this proc to handle the removal of an item from the storage item. The item will be moved to the atom sent as new_target. |
storage_close | Used to close the storage item. Used a lot - if tying it to special effects, use a content_watchers check to make sure it's closed properly and no-one's looking inside. |
Var Details
can_hold_skill
Special can_holds that require a skill to insert, it is an associated list of typepath = list(skilltype, skilllevel)
can_hold_skill_only
Dictates whether or not we only check for items in can_hold_skill rather than can_hold or free usage
required_skill_for_nest_opening
The required skill for opening this storage if it is inside another storage type
required_skill_level_for_nest_opening
The required level of a skill for opening this storage if it is inside another storage type
Proc Details
_item_insertion
Inserts the item. Separate proc because handle_item_insertion isn't guaranteed to insert and it therefore isn't safe to override it before calling parent. Updates icon when done. Can be called directly but only if the item was spawned inside src - handle_item_insertion is safer. W is always an item. stop_warning prevents messaging. user may be null.
_item_removal
Separate proc because remove_from_storage isn't guaranteed to finish. Can be called directly if the target atom exists and is an item. Updates icon when done.
handle_item_insertion
Handler for inserting items. It does not perform any checks of whether an item can or can't be inserted into the storage item. That's done by can_be_inserted(). Its checks are whether the item exists, is an item, and (if it's held by a mob) the mob can drop it. The stop_warning parameter will stop the insertion message from being displayed. It is intended for cases where you are inserting multiple items at once, such as when picking up all the items on a tile with one click. user can be null, it refers to the potential mob doing the insertion.
has_room
Returns TRUE if there is room for the given item. W_class_override allows checking for just a generic W_class, meant for checking shotgun handfuls without having to spawn and delete one just to check.
hide_from
Used to hide the storage's inventory screen.
post_skin_selection
Things to be done after selecting a map skin (if any) and before adding inventory and updating icon for the first time. Most likely saving basic icon state.
remove_from_storage
Call this proc to handle the removal of an item from the storage item. The item will be moved to the atom sent as new_target.
storage_close
Used to close the storage item. Used a lot - if tying it to special effects, use a content_watchers check to make sure it's closed properly and no-one's looking inside.