From 179d1519f98d7a24103c5b0a57324103cfc3454e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B0=D1=80=D0=BA?= Date: Sat, 6 Jan 2024 17:41:35 +0500 Subject: [PATCH] =?UTF-8?q?Revert=20"Revert=20"=D0=98=D0=BC=D1=8F=20=D0=BD?= =?UTF-8?q?=D0=B0=20=D0=BE=D1=88=D0=B5=D0=B9=D0=BD=D0=B8=D0=BA=D0=B5=20(#6?= =?UTF-8?q?74)""?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 7cf6ba6edbe52a28916a353613682b356e224ec0. --- code/game/atoms.dm | 8 +++++++- code/modules/clothing/neck/_neck.dm | 2 +- code/modules/mob/living/carbon/human/examine.dm | 4 +++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 4aa56b6aa5a3..5f0b926f0f73 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -1581,6 +1581,12 @@ var/shift_lmb_ctrl_shift_lmb_line = "" var/extra_lines = 0 var/extra_context = "" + var/auxiliary_name = "" + + if(ishuman(src)) + var/mob/living/carbon/human/H = src + var/obj/item/clothing/neck/petcollar/collar = H.wear_neck + auxiliary_name = (collar && collar.tagname) ? "\[[collar.tagname]\]" : "" if ((isliving(user) || isovermind(user) || isaicamera(user)) && (user.client.prefs.screentip_pref != SCREENTIP_PREFERENCE_NO_CONTEXT)) var/obj/item/held_item = user.get_active_held_item() @@ -1651,7 +1657,7 @@ active_hud.screentip_text.maptext = "" else //We inline a MAPTEXT() here, because there's no good way to statically add to a string like this - active_hud.screentip_text.maptext = "[name][extra_context]" + active_hud.screentip_text.maptext = "[name] [auxiliary_name][extra_context]" /** * Recursive getter method to return a list of all ghosts orbitting this atom diff --git a/code/modules/clothing/neck/_neck.dm b/code/modules/clothing/neck/_neck.dm index cfff6725a752..e15cdd9f7357 100644 --- a/code/modules/clothing/neck/_neck.dm +++ b/code/modules/clothing/neck/_neck.dm @@ -200,7 +200,7 @@ /obj/item/clothing/neck/petcollar/attack_self(mob/user) tagname = stripped_input(user, "Would you like to change the name on the tag?", "Name your new pet", "Spot", MAX_NAME_LEN) - name = "[initial(name)] - [tagname]" + name = tagname ? "[initial(name)] - [tagname]" : initial(name) /obj/item/clothing/neck/petcollar/Entered(atom/movable/AM) . = ..() diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index 5c0064f0b4ba..b1a8dd1118c8 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -18,7 +18,9 @@ var/mob/living/L = user if(HAS_TRAIT(L, TRAIT_PROSOPAGNOSIA) || HAS_TRAIT(L, TRAIT_INVISIBLE_MAN)) obscure_name = TRUE - . = list("Это - [!obscure_name ? name : "Неизвестный"]!") + var/obj/item/clothing/neck/petcollar/collar = wear_neck + var/collar_tagname = (collar && collar.tagname) ? " \[[collar.tagname]\]" : "" + . = list("Это - [!obscure_name ? name : "Неизвестный"][collar_tagname]!") if(skipface || get_visible_name() == "Unknown") . += "Вы не можете разобрать, к какому виду относится находящееся перед вами существо." else