shelver
Vars | |
allowed_types | A list of types which are are valid to place on this shelf. |
---|---|
default_rotation | The default rotation transformation for objects placed on the shelf. |
default_scale | The default scale transformation for objects placed on the shelf. |
placement_zones | A list whose keys are a 4-tuple of (left, bottom, right, top) bounding boxes to position details. Position details include "x" and "y" as pixel offsets, and "layer" as appearance layer for a placed object. |
random_pickup_locations | Whether objects auto-shelved by the component are placed in random order on the shelf. |
used_places | A list of slots, one per placement zone. Either empty, or containing the UID of the object in that place. |
Procs | |
add_item | Add an item to the shelf. |
Var Details
allowed_types
A list of types which are are valid to place on this shelf.
default_rotation
The default rotation transformation for objects placed on the shelf.
default_scale
The default scale transformation for objects placed on the shelf.
placement_zones
A list whose keys are a 4-tuple of (left, bottom, right, top) bounding boxes to position details. Position details include "x" and "y" as pixel offsets, and "layer" as appearance layer for a placed object.
random_pickup_locations
Whether objects auto-shelved by the component are placed in random order on the shelf.
used_places
A list of slots, one per placement zone. Either empty, or containing the UID of the object in that place.
Proc Details
add_item
Add an item to the shelf.
Arguments:
- to_add - The item to add. Adding will fail if not an
/obj/item
. - placement_idx - The slot on the shelf to add the item to.
- position_details - A list containing the "x" and "y" pixel offsets of the position, and the "layer" the object will be set to, if applicable.