item_quirk
Subtype quirk that has some bonus logic to spawn items for the player.
Vars | |
open_backpack | If true, the backpack automatically opens on post_add(). Usually set to TRUE when an item is equipped inside the player's backpack. |
---|---|
where_items_spawned | Lazylist of strings describing where all the quirk items have been spawned. |
Procs | |
give_item_to_holder | Handles inserting an item in any of the valid slots provided, then allows for post_add notification. |
Var Details
open_backpack
If true, the backpack automatically opens on post_add(). Usually set to TRUE when an item is equipped inside the player's backpack.
where_items_spawned
Lazylist of strings describing where all the quirk items have been spawned.
Proc Details
give_item_to_holder
Handles inserting an item in any of the valid slots provided, then allows for post_add notification.
If no valid slot is available for an item, the item is left at the mob's feet. Arguments:
- quirk_item - The item to give to the quirk holder. If the item is a path, the item will be spawned in first on the player's turf.
- valid_slots - Assoc list of descriptive location strings to item slots that is fed into [/mob/living/carbon/proc/equip_in_one_of_slots]. list(LOCATION_BACKPACK = ITEM_SLOT_BACKPACK)
- flavour_text - Optional flavour text to append to the where_items_spawned string after the item's location.
- default_location - If the item isn't possible to equip in a valid slot, this is a description of where the item was spawned.
- notify_player - If TRUE, adds strings to where_items_spawned list to be output to the player in /datum/quirk/item_quirk/post_add()