From 9df61a15679ecf750f34bf014cf2844e9dc706c6 Mon Sep 17 00:00:00 2001 From: MistakeNot4892 Date: Sun, 22 Jan 2023 17:07:01 +1100 Subject: [PATCH] Simple animal flavour text will now show instead of desc, if set. --- code/game/atoms.dm | 4 +++- .../simple_mob/subtypes/animal/_animal_harness.dm | 10 ++++------ .../mob/living/simple_mob/subtypes/animal/animal.dm | 6 ++---- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 610cdb202a..da58c8ba1a 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -212,6 +212,8 @@ var/global/list/pre_init_created_atoms // atom creation ordering means some stuf found += A.search_contents_for(path,filter_path) return found +/atom/proc/get_examine_desc() + return desc /atom/proc/examine(mob/user, infix = "", suffix = "") var/f_name = "\a [src][infix]." @@ -224,7 +226,7 @@ var/global/list/pre_init_created_atoms // atom creation ordering means some stuf f_name += "blood-stained [name][infix]!" else f_name += "oil-stained [name][infix]." - var/list/output = list("[bicon(src)] That's [f_name] [suffix]", desc) + var/list/output = list("[bicon(src)] That's [f_name] [suffix]", get_examine_desc()) if (user.client?.prefs.examine_text_mode == EXAMINE_MODE_SWITCH_TO_PANEL) user.client.statpanel = "Examine" else if (user.client) diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/_animal_harness.dm b/code/modules/mob/living/simple_mob/subtypes/animal/_animal_harness.dm index 354b12b858..856055b7f7 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/_animal_harness.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/_animal_harness.dm @@ -131,12 +131,10 @@ /mob/living/simple_mob/animal/examine(mob/living/user) . = ..() - if (!harness) - return - . += "\The [src] is wearing \a [harness]." - for (var/obj/item/item in harness.GetAttachedItems()) - . += "There is \a [item] attached." - + if (harness) + . += "\The [src] is wearing \a [harness]." + for (var/obj/item/item in harness.GetAttachedItems()) + . += "There is \a [item] attached." /mob/living/simple_mob/animal/proc/RemoveAttachmentVerb() set name = "Remove Harness Attachment" diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/animal.dm b/code/modules/mob/living/simple_mob/subtypes/animal/animal.dm index b6088e380b..b37b5da8ea 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/animal.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/animal.dm @@ -32,10 +32,8 @@ /decl/mob_organ_names/quadruped //Most subtypes have this basic body layout. hit_zones = list("head", "torso", "left foreleg", "right foreleg", "left hind leg", "right hind leg", "tail") -/mob/living/simple_mob/animal/examine(var/mob/user) - . = ..() - if(flavor_text) - . += flavor_text +/mob/living/simple_mob/animal/get_examine_desc() + return flavor_text || desc /mob/living/simple_mob/animal/verb/set_flavour_text() set name = "Set Flavour Text"