From 0d6841b1ac8a5b292e0171af8dccf946ba90fe2f Mon Sep 17 00:00:00 2001 From: Jack Edge Date: Tue, 24 May 2016 15:04:04 +0100 Subject: [PATCH] Made Restore Ghost Character affect deadchat only Instead of altering the name of the ghost mob and mind, now it just lets you babble in deadchat using your regular name with a special var. --- code/modules/mob/dead/observer/observer.dm | 13 ++++++------- code/modules/mob/new_player/new_player.dm | 3 +++ code/modules/mob/say.dm | 15 +++++++++------ 3 files changed, 18 insertions(+), 13 deletions(-) diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 42571768867..4c8d1773528 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -50,6 +50,9 @@ var/list/image/ghost_images_simple = list() //this is a list of all ghost images //If there's a bug with changing your ghost settings, it's probably related to this. var/ghost_accs = GHOST_ACCS_DEFAULT_OPTION var/ghost_others = GHOST_OTHERS_DEFAULT_OPTION + // Used for displaying in ghost chat, without changing the actual name + // of the mob + var/deadchat_name /mob/dead/observer/New(mob/body) verbs += /mob/dead/observer/proc/dead_tele @@ -592,11 +595,13 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp /mob/dead/observer/verb/restore_ghost_apperance() set name = "Restore Ghost Character" - set desc = "Sets your ghost name and apperance to the name of your \ + set desc = "Sets your deadchat name and ghost appearance to your \ roundstart character." set category = "Ghost" set_ghost_appearance() + if(client && client.prefs) + deadchat_name = client.prefs.real_name /mob/dead/observer/proc/set_ghost_appearance() if((!client) || (!client.prefs)) @@ -614,12 +619,6 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp facial_hair_style = client.prefs.facial_hair_style facial_hair_color = brighten_color(client.prefs.facial_hair_color) - real_name = client.prefs.real_name - name = real_name - - if(mind) - mind.name = name - update_icon() /mob/dead/observer/canUseTopic() diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index b40626de3f1..a64636ff460 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -130,6 +130,9 @@ observer.key = key observer.client = client observer.set_ghost_appearance() + if(client && client.prefs) + observer.real_name = client.prefs.real_name + observer.name = observer.real_name observer.update_icon() observer.stopLobbySound() qdel(mind) diff --git a/code/modules/mob/say.dm b/code/modules/mob/say.dm index 70344fe4bc1..e65ab6113d5 100644 --- a/code/modules/mob/say.dm +++ b/code/modules/mob/say.dm @@ -32,13 +32,16 @@ usr << "Speech is currently admin-disabled." return - if(mind && mind.name) - name = "[mind.name]" + var/mob/dead/observer/O = src + if(isobserver(src) && O.deadchat_name) + name = "[O.deadchat_name]" else - name = real_name - if(name != real_name) - alt_name = " (died as [real_name])" - + if(mind && mind.name) + name = "[mind.name]" + else + name = real_name + if(name != real_name) + alt_name = " (died as [real_name])" var/K