Fixes borg default name scheme

This commit is contained in:
AnturK
2018-06-28 20:31:21 +02:00
parent abfe09659c
commit 77a7c500c8
2 changed files with 6 additions and 4 deletions
+1 -1
View File
@@ -85,4 +85,4 @@ Cyborg
return H.Robotize(FALSE, latejoin)
/datum/job/cyborg/after_spawn(mob/living/silicon/robot/R, mob/M)
R.apply_pref_name("cyborg", M.client)
R.updatename(M.client)
@@ -234,14 +234,16 @@
module.transform_to(modulelist[input_module])
/mob/living/silicon/robot/proc/updatename()
/mob/living/silicon/robot/proc/updatename(client/C)
if(shell)
return
if(!C)
C = client
var/changed_name = ""
if(custom_name)
changed_name = custom_name
if(changed_name == "" && client && client.prefs.custom_names["cyborg"] != DEFAULT_CYBORG_NAME)
if(apply_pref_name("cyborg", client))
if(changed_name == "" && C && C.prefs.custom_names["cyborg"] != DEFAULT_CYBORG_NAME)
if(apply_pref_name("cyborg", C))
return //built in camera handled in proc
if(!changed_name)
changed_name = get_standard_name()