diff --git a/code/modules/mob/living/silicon/robot/robot_mob.dm b/code/modules/mob/living/silicon/robot/robot_mob.dm index 341079ffdc9..37ee1966f42 100644 --- a/code/modules/mob/living/silicon/robot/robot_mob.dm +++ b/code/modules/mob/living/silicon/robot/robot_mob.dm @@ -208,7 +208,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list( /mob/living/silicon/robot/rename_character(oldname, newname) if(!..(oldname, newname)) - return 0 + return FALSE if(oldname != real_name) notify_ai(3, oldname, newname) @@ -225,7 +225,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list( if(mmi && mmi.brainmob) mmi.brainmob.name = newname - return 1 + return TRUE /mob/living/silicon/robot/proc/check_custom_sprite() if(!custom_sprite && (ckey in GLOB.configuration.custom_sprites.cyborg_ckeys)) diff --git a/code/modules/mob/living/silicon/silicon_mob.dm b/code/modules/mob/living/silicon/silicon_mob.dm index cd8cc3f8858..8a5265899ac 100644 --- a/code/modules/mob/living/silicon/silicon_mob.dm +++ b/code/modules/mob/living/silicon/silicon_mob.dm @@ -167,13 +167,15 @@ alarm_types_clear[key] = 0 /mob/living/silicon/rename_character(oldname, newname) - // we actually don't want it changing minds and stuff if(!newname) - return 0 + return FALSE real_name = newname name = real_name - return 1 + if(mind?.is_original_mob(src)) + mind.set_original_mob(src) // update our original mind name, since this is our original mob. + mind.name = newname + return TRUE /mob/living/silicon/proc/show_laws() return diff --git a/code/modules/mob/living/simple_animal/bot/bot.dm b/code/modules/mob/living/simple_animal/bot/bot.dm index 9366461eb33..379e8e674cd 100644 --- a/code/modules/mob/living/simple_animal/bot/bot.dm +++ b/code/modules/mob/living/simple_animal/bot/bot.dm @@ -445,10 +445,10 @@ /mob/living/simple_animal/bot/rename_character(oldname, newname) if(!..(oldname, newname)) - return 0 + return FALSE set_custom_texts() - return 1 + return TRUE /mob/living/simple_animal/bot/proc/set_custom_texts() //Superclass for setting hack texts. Appears only if a set is not given to a bot locally. text_hack = "You hack [name]." diff --git a/code/modules/mob/mob_misc_procs.dm b/code/modules/mob/mob_misc_procs.dm index 1a1195cfafb..18c2d0371d4 100644 --- a/code/modules/mob/mob_misc_procs.dm +++ b/code/modules/mob/mob_misc_procs.dm @@ -602,7 +602,7 @@ /mob/proc/rename_character(oldname, newname) if(!newname) - return 0 + return FALSE real_name = newname name = newname if(mind) @@ -620,8 +620,8 @@ //update our pda and id if we have them on our person var/list/searching = GetAllContents(searchDepth = 3) - var/search_id = 1 - var/search_pda = 1 + var/search_id = TRUE + var/search_pda = TRUE for(var/A in searching) if(search_id && istype(A,/obj/item/card/id)) @@ -630,27 +630,26 @@ ID.registered_name = newname ID.name = "[newname]'s ID Card ([ID.assignment])" ID.RebuildHTML() - if(!search_pda) break - search_id = 0 + if(!search_pda) + break + search_id = FALSE else if(search_pda && istype(A,/obj/item/pda)) var/obj/item/pda/PDA = A if(PDA.owner == oldname) PDA.owner = newname PDA.name = "PDA-[newname] ([PDA.ownjob])" - if(!search_id) break - search_pda = 0 + if(!search_id) + break + search_pda = FALSE //Fixes renames not being reflected in objective text - var/length - var/pos - for(var/datum/objective/objective in GLOB.all_objectives) - if(!mind || objective.target != mind) - continue - length = length(oldname) - pos = findtextEx(objective.explanation_text, oldname) - objective.explanation_text = copytext(objective.explanation_text, 1, pos)+newname+copytext(objective.explanation_text, pos+length) - return 1 + if(mind) + for(var/datum/objective/objective in GLOB.all_objectives) + if(objective.target != mind) + continue + objective.update_explanation_text() + return TRUE /mob/proc/rename_self(role, allow_numbers = FALSE, force = FALSE) spawn(0)