Fix Silicon Examine Text

Preserve newlines in flavor text.
Include name and designation of cyborgs.
Include OOC text.
Display flavor text in chat within examine text span instead of after.
This commit is contained in:
psq95
2023-07-09 13:22:14 +01:00
parent d3240dec8a
commit 6a234681c2
5 changed files with 25 additions and 6 deletions
+1
View File
@@ -3003,6 +3003,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
// GS13: Silicon Examine Text
/datum/preferences/proc/copy_to_robot(mob/living/silicon/robot/cyborg, icon_updates = 1, roundstart_checks = TRUE)
SEND_SIGNAL(cyborg, COMSIG_SILICON_PREFS_COPIED_TO, src, icon_updates, roundstart_checks)
cyborg.ooc_text = features["ooc_text"]
/datum/preferences/proc/get_default_name(name_id)
switch(name_id)
+7 -3
View File
@@ -1,6 +1,10 @@
/mob/living/silicon/examine(mob/user) //Displays a silicon's laws to ghosts
. = ..()
/mob/living/silicon/examine(mob/user)
// GS13: Silicon Examine Text
// COMSIG_PARENT_EXAMINE is called in /mob/living/silicon/robot/examine instead of /atom/proc/examine
// to display flavour_text in the examine text span similar to /mob/living/carbon/human/examine
//Display a silicon's laws to ghosts
if(laws && isobserver(user))
. += "<b>[src] has the following laws:</b>"
for(var/law in laws.get_law_list(include_zeroth = TRUE))
. += law
. += law
@@ -48,5 +48,9 @@
. += "<span class='warning'>It doesn't seem to be responding.</span>"
if(DEAD)
. += "<span class='deadsay'>It looks like its system is corrupted and requires a reset.</span>"
// GS13: Silicon Examine Text
SEND_SIGNAL(src, COMSIG_PARENT_EXAMINE, user, .)
. += "*---------*</span>"
. += ..()