Ghost name QoL changes

🆑 coiax
rscadd: Ghosts now have the "Restore Character Name" verb, which will set
their ghost appearance and name to their character preferences.
bugfix: Mob spawners now give any generated names to the mind of the
spawned mob, meaning ghosts will have the name they had in life.
the outsiders as they see fit.
/🆑

...

fsdjkafklasdfljk
This commit is contained in:
Jack Edge
2016-05-23 23:00:26 +01:00
parent c9dc663b72
commit 9a15d97046
3 changed files with 37 additions and 14 deletions
+3 -2
View File
@@ -79,11 +79,12 @@
if(ckey)
M.ckey = ckey
M << "[flavour_text]"
var/datum/mind/MM = M.mind
if(objectives)
var/datum/mind/MM = M.mind
for(var/objective in objectives)
MM.objectives += new/datum/objective(objective)
special(M)
MM.name = M.real_name
if(uses > 0)
uses--
if(!permanent && !uses)
@@ -530,4 +531,4 @@
if(despawn == "No" || !loc || !Adjacent(user))
return
user.visible_message("<span class='notice'>[user.name] climbs back into cryosleep...</span>")
qdel(user)
qdel(user)
@@ -590,6 +590,38 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
src << "<span class='notice'>Data HUDs enabled.</span>"
data_huds_on = 1
/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 \
roundstart character."
set category = "Ghost"
set_ghost_appearance()
/mob/dead/observer/proc/set_ghost_appearance()
if((!client) || (!client.prefs))
return
if(client.prefs.be_random_name)
client.prefs.real_name = random_unique_name(gender)
if(client.prefs.be_random_body)
client.prefs.random_character(gender)
if(HAIR in client.prefs.pref_species.specflags)
hair_style = client.prefs.hair_style
hair_color = brighten_color(client.prefs.hair_color)
if(FACEHAIR in client.prefs.pref_species.specflags)
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()
if(check_rights(R_ADMIN, 0))
return 1
+2 -12
View File
@@ -127,19 +127,9 @@
observer.loc = O.loc
else
src << "<span class='notice'>Teleporting failed. You should be able to use ghost verbs to teleport somewhere useful</span>"
if(client.prefs.be_random_name)
client.prefs.real_name = random_unique_name(gender)
if(client.prefs.be_random_body)
client.prefs.random_character(gender)
if(HAIR in client.prefs.pref_species.specflags)
observer.hair_style = client.prefs.hair_style
observer.hair_color = observer.brighten_color(client.prefs.hair_color)
if(FACEHAIR in client.prefs.pref_species.specflags)
observer.facial_hair_style = client.prefs.facial_hair_style
observer.facial_hair_color = observer.brighten_color(client.prefs.facial_hair_color)
observer.real_name = client.prefs.real_name
observer.name = observer.real_name
observer.key = key
observer.client = client
observer.set_ghost_appearance()
observer.update_icon()
observer.stopLobbySound()
qdel(mind)