mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-11 07:58:57 +01:00
1f9b926ed7
This PR adds a framework for Tool Qualities. This is done via adding a new Tool Quality Container Component, which allows any arbitrary datum to have tool qualities, which can be checked for by other systems as desired. These are handled as key/value pairs in an associative list, allowing atoms to have different quality levels as a given tool, such as being a "level 3 crowbar" and a "level 1 hammer" at the same time. --------- Signed-off-by: Batrachophreno <Batrochophreno@gmail.com> Co-authored-by: Batrachophreno <Batrochophreno@gmail.com>
10 lines
395 B
Plaintext
10 lines
395 B
Plaintext
|
|
/datum/component/tool_quality_container
|
|
/**
|
|
* The set of all tool qualities stored on a datum. Associative list of tool type to tool level.
|
|
* Formatted like alist(TOOL_CROWBAR = 3, TOOL_CHISEL = 1).
|
|
* Access tool qualities directly with GET_TOOL_LEVEL(target, TOOL_CROWBAR)
|
|
* or fetch the entire associative list via GET_TOOL_QUALITIES(target)
|
|
*/
|
|
var/alist/tool_qualities = alist()
|