From d29ce2328c64ba36444ce3a08505d54acd9ef0be Mon Sep 17 00:00:00 2001 From: SandPoot Date: Thu, 9 Feb 2023 02:25:34 -0300 Subject: [PATCH] some extra touches --- code/datums/elements/screentips/README.md | 10 +++++----- code/modules/mob/living/carbon/carbon_context.dm | 2 +- .../mob/living/carbon/human/human_context.dm | 15 +++++++++++++++ 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/code/datums/elements/screentips/README.md b/code/datums/elements/screentips/README.md index 95dd54d7f7..5b4ee4fd18 100644 --- a/code/datums/elements/screentips/README.md +++ b/code/datums/elements/screentips/README.md @@ -38,18 +38,18 @@ Example: if (!(flags_1 & NODECONSTRUCT_1)) var/static/list/tool_behaviors = list( TOOL_SCREWDRIVER = list( - SCREENTIP_CONTEXT_LMB = "Disassemble", + SCREENTIP_CONTEXT_LMB = list(INTENT_ANY = "Disassemble"), ), TOOL_WRENCH = list( - SCREENTIP_CONTEXT_LMB = "Deconstruct", + SCREENTIP_CONTEXT_LMB = list(INTENT_ANY = "Deconstruct"), ), ) AddElement(/datum/element/contextual_screentip_tools, tool_behaviors) ``` -This will display "RMB: Deconstruct" when the user hovers over a table with a wrench. +This will display "LMB: Deconstruct" when the user hovers over a table with a wrench. ### `/datum/element/contextual_screentip_item_typechecks` @@ -63,11 +63,11 @@ Example: var/static/list/hovering_item_typechecks = list( /obj/item/stack/rods = list( - SCREENTIP_CONTEXT_LMB = "Craft wired rod", + SCREENTIP_CONTEXT_LMB = list(INTENT_ANY = "Craft wired rod"), ), /obj/item/stack/sheet/iron = list( - SCREENTIP_CONTEXT_LMB = "Craft bola", + SCREENTIP_CONTEXT_LMB = list(INTENT_ANY = "Craft bola"), ), ) diff --git a/code/modules/mob/living/carbon/carbon_context.dm b/code/modules/mob/living/carbon/carbon_context.dm index 36c7974574..e7fc4d11bf 100644 --- a/code/modules/mob/living/carbon/carbon_context.dm +++ b/code/modules/mob/living/carbon/carbon_context.dm @@ -38,7 +38,7 @@ LAZYSET(context[SCREENTIP_CONTEXT_LMB], INTENT_HARM, "Attack") - // Did you know we cannot upgrade grabs from ctrl-click, that's cool + // Monkeys cannot be grabbed harder using ctrl-click, don't ask. if((pulledby != user) && (src != user)) LAZYSET(context[SCREENTIP_CONTEXT_CTRL_LMB], INTENT_ANY, "Pull") // Happens on any intent i believe diff --git a/code/modules/mob/living/carbon/human/human_context.dm b/code/modules/mob/living/carbon/human/human_context.dm index fb3087f432..5229fba3ea 100644 --- a/code/modules/mob/living/carbon/human/human_context.dm +++ b/code/modules/mob/living/carbon/human/human_context.dm @@ -18,4 +18,19 @@ else if(aim_for_groin && (src == user || lying || same_dir) && (target_on_help || target_restrained || target_aiming_for_groin)) LAZYSET(context[SCREENTIP_CONTEXT_LMB], INTENT_DISARM, "Slap ass") + // Humans can actually be upgrade grabbed using ctrl-click + if(src != user) + if (pulledby == user) + switch (user.grab_state) + if (GRAB_PASSIVE) + LAZYSET(context[SCREENTIP_CONTEXT_CTRL_LMB], INTENT_ANY, "Grip") + if (GRAB_AGGRESSIVE) + LAZYSET(context[SCREENTIP_CONTEXT_CTRL_LMB], INTENT_ANY, "Choke") + if (GRAB_NECK) + LAZYSET(context[SCREENTIP_CONTEXT_CTRL_LMB], INTENT_ANY, "Strangle") + else + return . + else + LAZYSET(context[SCREENTIP_CONTEXT_CTRL_LMB], INTENT_ANY, "Pull") + return CONTEXTUAL_SCREENTIP_SET