diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index c29a796a39a..0300d4f655d 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -330,6 +330,10 @@ Turf and target are seperate in case you want to teleport some distance from a t A.aiPDA.owner = newname A.aiPDA.name = newname + " (" + A.aiPDA.ownjob + ")" + if(cmptext("cyborg",role)) + if(isrobot(src)) + var/mob/living/silicon/robot/A = src + A.custom_name = newname fully_replace_character_name(oldname,newname) diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index c2c1cb2dd33..7f5c5588a3d 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -98,6 +98,8 @@ var/revival_cloning = 1 var/revival_brain_life = -1 + var/rename_cyborg = 1 + //Used for modifying movement speed for mobs. //Unversal modifiers var/run_speed = 0 @@ -277,6 +279,8 @@ config.revival_cloning = text2num(value) if("revival_brain_life") config.revival_brain_life = text2num(value) + if("rename_cyborg") + config.rename_cyborg = text2num(value) if("run_delay") config.run_speed = text2num(value) if("walk_delay") diff --git a/code/game/objects/items/robot/robot_upgrades.dm b/code/game/objects/items/robot/robot_upgrades.dm index 8904cbbfc21..7f7aa10d91d 100644 --- a/code/game/objects/items/robot/robot_upgrades.dm +++ b/code/game/objects/items/robot/robot_upgrades.dm @@ -53,6 +53,7 @@ if(..()) return 0 R.name = heldname R.real_name = heldname + R.custom_name = heldname //Required or else if the cyborg's module changes, their name is lost. return 1 diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm index 6622d549dc4..8475e216345 100644 --- a/code/modules/mob/transform_procs.dm +++ b/code/modules/mob/transform_procs.dm @@ -282,6 +282,10 @@ var/mob/living/silicon/robot/O = new /mob/living/silicon/robot( loc ) + if (!config.rename_cyborg) + else + O.rename_self("cyborg", 1) + // cyborgs produced by Robotize get an automatic power cell O.cell = new(O) O.cell.maxcharge = 7500 diff --git a/config/game_options.txt b/config/game_options.txt index a01b8ef2450..6e26961d8b4 100644 --- a/config/game_options.txt +++ b/config/game_options.txt @@ -18,6 +18,10 @@ REVIVAL_CLONING 1 # amount of time (in hundredths of seconds) for which a brain retains the "spark of life" after the person's death (set to -1 for infinite) REVIVAL_BRAIN_LIFE -1 +### RENAMING ### + +# Whether cyborgs can rename themselves at roundstart or when built. Has no effect on roboticists renaming cyborgs the normal way. Set to 0 to disable self-renaming. +RENAME_CYBORG 1 ### MOB MOVEMENT ###