diff --git a/code/game/objects/items/devices/communicator/UI.dm b/code/game/objects/items/devices/communicator/UI.dm index cbdae90c90..f2d3fd39b6 100644 --- a/code/game/objects/items/devices/communicator/UI.dm +++ b/code/game/objects/items/devices/communicator/UI.dm @@ -134,11 +134,7 @@ if(href_list["rename"]) var/new_name = sanitizeSafe(input(usr,"Please enter your name.","Communicator",usr.name) ) if(new_name) - owner = new_name - name = "[owner]'s [initial(name)]" - if(camera) - camera.name = name - camera.c_tag = name + register_device(new_name) if(href_list["toggle_visibility"]) switch(network_visibility) diff --git a/code/game/objects/items/devices/communicator/communicator.dm b/code/game/objects/items/devices/communicator/communicator.dm index f809bcb9b2..7342988916 100644 --- a/code/game/objects/items/devices/communicator/communicator.dm +++ b/code/game/objects/items/devices/communicator/communicator.dm @@ -75,12 +75,12 @@ var/global/list/obj/item/device/communicator/all_communicators = list() //This is a pretty terrible way of doing this. spawn(5 SECONDS) //Wait for our mob to finish spawning. if(ismob(loc)) - register_device(loc) + register_device(loc.name) initialize_exonet(loc) else if(istype(loc, /obj/item/weapon/storage)) var/obj/item/weapon/storage/S = loc if(ismob(S.loc)) - register_device(S.loc) + register_device(S.loc.name) initialize_exonet(S.loc) // Proc: examine() @@ -268,12 +268,12 @@ var/global/list/obj/item/device/communicator/all_communicators = list() // Proc: register_device() // Parameters: 1 (user - the person to use their name for) // Description: Updates the owner's name and the device's name. -/obj/item/device/communicator/proc/register_device(mob/user) - if(!user) +/obj/item/device/communicator/proc/register_device(new_name) + if(!new_name) return - owner = user.name + owner = new_name - name = "[owner]'s [initial(name)]" + name = "[new_name]'s [initial(name)]" if(camera) camera.name = name camera.c_tag = name diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 2bdcf1b912..2b11059ff9 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -258,7 +258,7 @@ var/list/ai_verbs_default = list( aiPDA.name = pickedName + " (" + aiPDA.ownjob + ")" if(aiCommunicator) - aiCommunicator.register_device(src) + aiCommunicator.register_device(src.name) /* The AI Power supply is a dummy object used for powering the AI since only machinery should be using power. diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 589f410f01..be725f353d 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -210,7 +210,7 @@ /mob/living/silicon/robot/proc/setup_communicator() if (!communicator) communicator = new/obj/item/device/communicator/integrated(src) - communicator.register_device(src, "[modtype] [braintype]") + communicator.register_device(src.name, "[modtype] [braintype]") //If there's an MMI in the robot, have it ejected when the mob goes away. --NEO //Improved /N