diff --git a/code/game/objects/items/robot/robot_upgrades.dm b/code/game/objects/items/robot/robot_upgrades.dm
index 1e8bc3891b9..6020cc834a2 100644
--- a/code/game/objects/items/robot/robot_upgrades.dm
+++ b/code/game/objects/items/robot/robot_upgrades.dm
@@ -32,7 +32,6 @@
R.icon_state = "robot"
del(R.module)
R.module = null
- R.modtype = "robot"
R.updatename("Default")
R.status_flags |= CANPUSH
R.updateicon()
@@ -52,6 +51,7 @@
/obj/item/borg/upgrade/rename/action(var/mob/living/silicon/robot/R)
if(..()) return 0
R.name = heldname
+ R.custom_name = heldname
R.real_name = heldname
return 1
diff --git a/code/modules/mob/living/silicon/robot/examine.dm b/code/modules/mob/living/silicon/robot/examine.dm
index 98943f99886..2a9886dee1e 100644
--- a/code/modules/mob/living/silicon/robot/examine.dm
+++ b/code/modules/mob/living/silicon/robot/examine.dm
@@ -6,7 +6,7 @@
usr << "Something is there but you can't see it."
return
- var/msg = "*---------*\nThis is \icon[src] \a [src]!\n"
+ var/msg = "*---------*\nThis is \icon[src] \a [src][custom_name ? ", [modtype] [braintype]" : ""]!\n"
msg += ""
if (src.getBruteLoss())
if (src.getBruteLoss() < 75)
diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm
index 1f84e124d52..2de2de5f108 100644
--- a/code/modules/mob/living/silicon/robot/robot.dm
+++ b/code/modules/mob/living/silicon/robot/robot.dm
@@ -47,7 +47,7 @@
//var/list/laws = list()
var/alarms = list("Motion"=list(), "Fire"=list(), "Atmosphere"=list(), "Power"=list(), "Camera"=list())
var/viewalerts = 0
- var/modtype = "robot"
+ var/modtype = "Default"
var/lower_mod = 0
var/jetpack = 0
var/datum/effect/effect/system/ion_trail_follow/ion_trail = null
@@ -86,7 +86,7 @@
module = new /obj/item/weapon/robot_module/syndicate(src)
hands.icon_state = "standard"
icon_state = "secborg"
- modtype = "Synd"
+ modtype = "Security"
else
laws = new /datum/ai_laws/nanotrasen()
connected_ai = select_active_ai_with_fewest_borgs()
@@ -150,25 +150,23 @@
if(emagged || security_level > SEC_LEVEL_BLUE)
src << "\red Crisis mode active. Combat module available."
modules+="Combat"
- var/mod = input("Please, select a module!", "Robot", null, null) in modules
+ modtype = input("Please, select a module!", "Robot", null, null) in modules
var/module_sprites[0] //Used to store the associations between sprite names and sprite index.
var/channels = list()
if(module)
return
-
- switch(mod)
+
+ switch(modtype)
if("Standard")
module = new /obj/item/weapon/robot_module/standard(src)
- modtype = "Stand"
module_sprites["Basic"] = "robot_old"
module_sprites["Android"] = "droid"
module_sprites["Default"] = "robot"
if("Service")
module = new /obj/item/weapon/robot_module/butler(src)
- modtype = "Butler"
module_sprites["Waitress"] = "Service"
module_sprites["Kent"] = "toiletbot"
module_sprites["Bro"] = "Brobot"
@@ -177,7 +175,6 @@
if("Miner")
module = new /obj/item/weapon/robot_module/miner(src)
- modtype = "Miner"
channels = list("Supply" = 1)
module_sprites["Basic"] = "Miner_old"
module_sprites["Advanced Droid"] = "droid-miner"
@@ -185,7 +182,6 @@
if("Medical")
module = new /obj/item/weapon/robot_module/medical(src)
- modtype = "Med"
channels = list("Medical" = 1)
module_sprites["Basic"] = "Medbot"
module_sprites["Advanced Droid"] = "droid-medical"
@@ -194,7 +190,6 @@
if("Security")
module = new /obj/item/weapon/robot_module/security(src)
- modtype = "Sec"
channels = list("Security" = 1)
module_sprites["Basic"] = "secborg"
module_sprites["Red Knight"] = "Security"
@@ -203,7 +198,6 @@
if("Engineering")
module = new /obj/item/weapon/robot_module/engineering(src)
- modtype = "Eng"
channels = list("Engineering" = 1)
module_sprites["Basic"] = "Engineering"
module_sprites["Antique"] = "engineerrobot"
@@ -211,24 +205,22 @@
if("Janitor")
module = new /obj/item/weapon/robot_module/janitor(src)
- modtype = "Jan"
module_sprites["Basic"] = "JanBot2"
module_sprites["Mopbot"] = "janitorrobot"
module_sprites["Mop Gear Rex"] = "mopgearrex"
if("Combat")
module = new /obj/item/weapon/robot_module/combat(src)
- modtype = "Com"
module_sprites["Combat Android"] = "droid-combat"
channels = list("Security" = 1)
//Custom_sprite check and entry
if (custom_sprite == 1)
module_sprites["Custom"] = "[src.ckey]-[mod]"
-
- hands.icon_state = lowertext(mod)
- feedback_inc("cyborg_[lowertext(mod)]",1)
- updatename(mod)
+
+ hands.icon_state = lowertext(modtype)
+ feedback_inc("cyborg_[lowertext(modtype)]",1)
+ updatename()
if(mod == "Medical" || mod == "Security" || mod == "Combat")
status_flags &= ~CANPUSH
@@ -238,7 +230,8 @@
base_icon = icon_state
/mob/living/silicon/robot/proc/updatename(var/prefix as text)
-
+ if(prefix)
+ modtype = prefix
if(istype(mmi, /obj/item/device/mmi/posibrain))
braintype = "Android"
else
@@ -248,7 +241,7 @@
if(custom_name)
changed_name = custom_name
else
- changed_name = "[(prefix ? "[prefix] " : "")][braintype]-[num2text(ident)]"
+ changed_name = "[modtype] [braintype]-[num2text(ident)]"
real_name = changed_name
name = real_name
@@ -258,7 +251,7 @@
//We also need to update name of internal camera.
if (camera)
camera.c_tag = changed_name
-
+
if(!custom_sprite) //Check for custom sprite
var/file = file2text("config/custom_sprites.txt")
var/lines = text2list(file, "\n")
@@ -271,10 +264,10 @@
if(Entry.len < 2)
continue;
-
+
if(Entry[1] == src.ckey && Entry[2] == src.real_name) //They're in the list? Custom sprite time, var and icon change required
- custom_sprite = 1
- icon = 'icons/mob/custom-synthetic.dmi'
+ custom_sprite = 1
+ icon = 'icons/mob/custom-synthetic.dmi'
/mob/living/silicon/robot/verb/Namepick()
if(custom_name)
@@ -286,7 +279,7 @@
if (newname != "")
custom_name = newname
- updatename("Default")
+ updatename()
updateicon()
/mob/living/silicon/robot/verb/cmd_robot_alerts()
@@ -989,7 +982,7 @@
overlays += "eyes-[icon_state]"
else
overlays -= "eyes"
-
+
if(opened && custom_sprite == 1) //Custom borgs also have custom panels, heh
if(wiresexposed)
overlays += "[src.ckey]-openpanel +w"