Merge pull request #14387 from VOREStation/upstream-merge-8894

[MIRROR] Simple animal flavour text will now show instead of desc, if set.
This commit is contained in:
Heroman3003
2023-01-27 19:13:50 +10:00
committed by CHOMPStation2
parent fed8c75408
commit 5ea98d068d
2 changed files with 18 additions and 3 deletions

View File

@@ -211,6 +211,9 @@
found += A.search_contents_for(path,filter_path)
return found
/atom/proc/get_examine_desc()
return desc
//All atoms
/atom/proc/examine(mob/user, var/infix = "", var/suffix = "")
//This reformat names to get a/an properly working on item descriptions when they are bloody
@@ -225,14 +228,13 @@
else
f_name += "oil-stained [name][infix]."
var/list/output = list("\icon[src.examine_icon()][bicon(src)] That's [f_name] [suffix]", desc)
var/list/output = list("\icon[src.examine_icon()][bicon(src)] That's [f_name] [suffix]", get_examine_desc())
if(user.client?.prefs.examine_text_mode == EXAMINE_MODE_INCLUDE_USAGE)
output += description_info
if(user.client?.prefs.examine_text_mode == EXAMINE_MODE_SWITCH_TO_PANEL)
user.client.statpanel = "Examine" // Switch to stat panel
SEND_SIGNAL(src, COMSIG_PARENT_EXAMINE, user, output)
return output

View File

@@ -24,4 +24,17 @@
)
/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")
hit_zones = list("head", "torso", "left foreleg", "right foreleg", "left hind leg", "right hind leg", "tail")
/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"
set category = "IC"
set desc = "Set your flavour text."
set src = usr
var/new_flavour_text = sanitize((input("Please describe yourself.", "Flavour Text", flavor_text) as message|null), MAX_MESSAGE_LEN)
if(length(new_flavour_text) && !QDELETED(src))
flavor_text = new_flavour_text
to_chat(src, SPAN_NOTICE("Your flavour text has been updated."))