Add UI screentips to spraycans (#80564)

## About The Pull Request

This adds screentips to spraycans for:

- AltClick - toggle cap
- RMB - copy
- LMB - paint

## Why It's Good For The Game

Better UI/UX.

## Changelog

🆑
qol: Add UI screentips to spraycans
/🆑

---------

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
This commit is contained in:
Tim
2023-12-26 20:33:10 +01:00
committed by GitHub
co-authored by Mothblocks
parent 464be9f432
commit 5fca80e59e
+24
View File
@@ -762,6 +762,30 @@
/datum/component/slapcrafting,\
slapcraft_recipes = slapcraft_recipe_list,\
)
register_context()
register_item_context()
/obj/item/toy/crayon/spraycan/add_context(atom/source, list/context, obj/item/held_item, mob/living/user)
. = ..()
if(!user.can_perform_action(src, NEED_DEXTERITY|NEED_HANDS))
return .
if(has_cap)
context[SCREENTIP_CONTEXT_ALT_LMB] = "Toggle cap"
return CONTEXTUAL_SCREENTIP_SET
/obj/item/toy/crayon/spraycan/add_item_context(datum/source, list/context, atom/target, mob/living/user)
. = ..()
if(!user.can_perform_action(src, NEED_DEXTERITY|NEED_HANDS))
return .
context[SCREENTIP_CONTEXT_LMB] = "Paint"
context[SCREENTIP_CONTEXT_RMB] = "Copy color"
return CONTEXTUAL_SCREENTIP_SET
/obj/item/toy/crayon/spraycan/isValidSurface(surface)
return (isfloorturf(surface) || iswallturf(surface))