From 751fcb5f164c6d3c63e00e47f95ab8e97a96a63f Mon Sep 17 00:00:00 2001 From: Tim Date: Fri, 26 Sep 2025 08:18:30 -0500 Subject: [PATCH] Add more examine tags and fix ones not appearing (#93110) ## About The Pull Request This fixes custom materials not appearing for things like structures. It also adds a bunch of new tags: - bomb-proof - flammable - holograhic - ~~unpaintable~~ - ~~supermatter proof~~ - ~~recolorable~~ - crush-proof - conductive Also use hyphens for multi-word examine tags. ## Why It's Good For The Game Better UX ## Changelog :cl: qol: Add several new examine categories for objects descs that include: bomb-proof, flammable, holograhic, crush-proof, and conductive. Also use hyphens for multi-word examine tags. fix: Fixes custom materials not appearing for things like structures when examined. /:cl: --- code/game/atom/atom_examine.dm | 28 ++++++++++++++++++++++++++-- code/game/objects/items.dm | 13 ------------- code/game/objects/objs.dm | 2 ++ code/modules/clothing/clothing.dm | 4 ++-- 4 files changed, 30 insertions(+), 17 deletions(-) diff --git a/code/game/atom/atom_examine.dm b/code/game/atom/atom_examine.dm index 6b1a6725667..7b6260758d0 100644 --- a/code/game/atom/atom_examine.dm +++ b/code/game/atom/atom_examine.dm @@ -19,14 +19,17 @@ . += "[desc]" var/list/tags_list = examine_tags(user) + var/list/post_descriptor = examine_post_descriptor(user) + var/post_desc_string = length(post_descriptor) ? " [jointext(post_descriptor, " ")]" : "" if (length(tags_list)) var/tag_string = list() for (var/atom_tag in tags_list) tag_string += (isnull(tags_list[atom_tag]) ? atom_tag : span_tooltip(tags_list[atom_tag], atom_tag)) // some regex to ensure that we don't add another "and" if the final element's main text (not tooltip) has one tag_string = english_list(tag_string, and_text = (findtext(tag_string[length(tag_string)], regex(@">.*?and .*?<"))) ? " " : " and ") - var/post_descriptor = examine_post_descriptor(user) - . += "[p_They()] [p_are()] a [tag_string] [examine_descriptor(user)][length(post_descriptor) ? " [jointext(post_descriptor, " ")]" : ""]." + . += "[p_They()] [p_are()] a [tag_string] [examine_descriptor(user)][post_desc_string]." + else if(post_desc_string) + . += "[p_They()] [p_are()] a [examine_descriptor(user)][post_desc_string]." if(reagents) var/user_sees_reagents = user.can_see_reagents() @@ -77,6 +80,27 @@ if(abstract_type == type) .[span_hypnophrase("abstract")] = "This is an abstract concept, you should report this to a strange entity called GITHUB!" + if(resistance_flags & INDESTRUCTIBLE) + .["indestructible"] = "It is extremely robust! It'll probably withstand anything that could happen to it!" + else + if(resistance_flags & LAVA_PROOF) + .["lava-proof"] = "It is made of an extremely heat-resistant material, it'd probably be able to withstand lava!" + if(resistance_flags & (ACID_PROOF | UNACIDABLE)) + .["acid-proof"] = "It looks pretty robust! It'd probably be able to withstand acid!" + if(resistance_flags & FREEZE_PROOF) + .["freeze-proof"] = "It is made of cold-resistant materials." + if(resistance_flags & FIRE_PROOF) + .["fire-proof"] = "It is made of fire-retardant materials." + if(resistance_flags & SHUTTLE_CRUSH_PROOF) + .["crush-proof"] = "It is extremely solid. It should be able to withstand being run over by a shuttle!" + if(resistance_flags & BOMB_PROOF) + .["bomb-proof"] = "It looks like it could survive an explosion!" + if(resistance_flags & FLAMMABLE) + .["flammable"] = "It looks like it could easily catch on fire." + + if(flags_1 & HOLOGRAM_1) + .["holographic"] = "It looks like a hologram." + SEND_SIGNAL(src, COMSIG_ATOM_EXAMINE_TAGS, user, .) /// What this atom should be called in examine tags diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index d4fc9743368..46a13eafafa 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -458,19 +458,6 @@ else if (siemens_coefficient <= 0.5) .["partially insulated"] = "It is made from a poor insulator that will dampen (but not fully block) electric shocks passing through it." - if(resistance_flags & INDESTRUCTIBLE) - .["indestructible"] = "It is extremely robust! It'll probably withstand anything that could happen to it!" - return - - if(resistance_flags & LAVA_PROOF) - .["lavaproof"] = "It is made of an extremely heat-resistant material, it'd probably be able to withstand lava!" - if(resistance_flags & (ACID_PROOF | UNACIDABLE)) - .["acidproof"] = "It looks pretty robust! It'd probably be able to withstand acid!" - if(resistance_flags & FREEZE_PROOF) - .["freezeproof"] = "It is made of cold-resistant materials." - if(resistance_flags & FIRE_PROOF) - .["fireproof"] = "It is made of fire-retardant materials." - /obj/item/examine_descriptor(mob/user) return "item" diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index 84df412532e..5f9b566b670 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -223,6 +223,8 @@ GLOBAL_LIST_EMPTY(objects_by_id_tag) . = ..() if(obj_flags & UNIQUE_RENAME) .["renameable"] = "Use a pen on it to rename it or change its description." + if(obj_flags & CONDUCTS_ELECTRICITY) + .["conductive"] = "It appears to be a good conductor of electricity." /obj/analyzer_act(mob/living/user, obj/item/analyzer/tool) if(atmos_scan(user=user, target=src, silent=FALSE)) diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index 50204df47b1..198cb6b27a9 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -366,9 +366,9 @@ if (clothing_flags & CASTING_CLOTHES) .["magical"] = "Allows magical beings to cast spells when wearing [src]." if((clothing_flags & STOPSPRESSUREDAMAGE) || (visor_flags & STOPSPRESSUREDAMAGE)) - .["pressureproof"] = "Protects the wearer from extremely low or high pressure, such as vacuum of space." + .["pressure-proof"] = "Protects the wearer from extremely low or high pressure, such as vacuum of space." if(flags_cover & PEPPERPROOF) - .["pepperproof"] = "Protects the wearer from the effects of pepperspray." + .["pepper-proof"] = "Protects the wearer from the effects of pepperspray." if (heat_protection || cold_protection) var/heat_desc var/cold_desc