subtype_picker 
/datum/component/subtype_picker
Usage: Initialize with a subtype -> description map and optional callback. When the parent item is self-activated, a radial menu opens for the held user and a chosen subtype is spawned into their hands.
Vars | |
| built_radial_list | list given to the radial menu to display, built after init |
|---|---|
| name2subtype | the radial will return a name of the wanted subtype, this is a list of names back to the type, built after init |
| on_picked_callback | optional proc to callback to when the weapon is picked |
| subtype2descriptions | A list of types and their menu descriptions |
Procs | |
| build_radial_list | pick_subtype: turns the list of types to their description into all the data radial menus need |
| check_menu | Checks if we are allowed to interact with the radial menu |
| on_attack_self | signal called by the stat of the target changing |
| pick_subtype | pick_subtype: called from on_attack_self, shows a user a radial menu of all available null rod reskins and replaces the current null rod with the user's chosen reskinned variant |
Var Details
built_radial_list 
list given to the radial menu to display, built after init
name2subtype 
the radial will return a name of the wanted subtype, this is a list of names back to the type, built after init
on_picked_callback 
optional proc to callback to when the weapon is picked
subtype2descriptions 
A list of types and their menu descriptions
Proc Details
build_radial_list
pick_subtype: turns the list of types to their description into all the data radial menus need
check_menu
Checks if we are allowed to interact with the radial menu
Arguments:
- target: parent the radial menu is from
- user: the mob interacting with the menu
on_attack_self
signal called by the stat of the target changing
pick_subtype
pick_subtype: called from on_attack_self, shows a user a radial menu of all available null rod reskins and replaces the current null rod with the user's chosen reskinned variant
Arguments:
- target: parent this element is attached to that is being activated
- picker: user who interacted with the item