mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 06:29:23 +01:00
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:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user