diff --git a/code/_onclick/hud/robot.dm b/code/_onclick/hud/robot.dm index b735d05c3da..a542c0345fd 100644 --- a/code/_onclick/hud/robot.dm +++ b/code/_onclick/hud/robot.dm @@ -211,7 +211,7 @@ //Unfortunately adding the emag module to the list of modules has to be here. This is because a borg can //be emagged before they actually select a module. - or some situation can cause them to get a new module // - or some situation might cause them to get de-emagged or something. - if(R.emagged) + if(R.emagged || R.weapons_unlock) if(!(R.module.emag in R.module.modules)) R.module.modules.Add(R.module.emag) else diff --git a/code/game/objects/items/robot/robot_upgrades.dm b/code/game/objects/items/robot/robot_upgrades.dm index 1f8cb43fbb2..4c9bbb38747 100644 --- a/code/game/objects/items/robot/robot_upgrades.dm +++ b/code/game/objects/items/robot/robot_upgrades.dm @@ -68,6 +68,9 @@ /obj/item/borg/upgrade/rename/action(var/mob/living/silicon/robot/R) if(..()) return + if(!R.allow_rename) + to_chat(R, "Internal diagnostic error: incompatible upgrade module detected."); + return 0 R.notify_ai(3, R.name, heldname) R.name = heldname R.custom_name = heldname @@ -215,6 +218,10 @@ if(R.emagged) return + if(R.weapons_unlock) + to_chat(R, "Internal diagnostic error: incompatible upgrade module detected."); + return + R.emagged = 1 return 1 diff --git a/code/game/response_team.dm b/code/game/response_team.dm index a7e8c7cbae6..f8a11af6026 100644 --- a/code/game/response_team.dm +++ b/code/game/response_team.dm @@ -118,7 +118,9 @@ var/ert_request_answered = 0 var/mob/living/silicon/robot/ert/R = new() R.forceMove(spawn_location) var/rnum = rand(1,1000) - R.name = "ERT [rnum]" + var/borgname = "ERT [rnum]" + R.name = borgname + R.custom_name = borgname R.real_name = R.name R.mind = new R.mind.current = R diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index d1a1d848821..67b2f2c0f97 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -50,6 +50,12 @@ var/list/robot_verbs_default = list( var/opened = 0 var/emagged = 0 + + var/list/force_modules = list() + var/allow_rename = TRUE + var/weapons_unlock = FALSE + var/static_radio_channels = FALSE + var/wiresexposed = 0 var/locked = 1 var/list/req_access = list(access_robotics) @@ -215,7 +221,9 @@ var/list/robot_verbs_default = list( set category = "Robot Commands" if(custom_name) return 0 - + if(!allow_rename) + to_chat(src, "Rename functionality is not enabled on this unit."); + return 0 rename_self(braintype, 1) /mob/living/silicon/robot/proc/sync() @@ -271,6 +279,8 @@ var/list/robot_verbs_default = list( modules += "Security" if(!config.forbid_peaceborg) modules += "Peacekeeper" + if(islist(force_modules) && force_modules.len) + modules = force_modules.Copy() if(security_level == (SEC_LEVEL_GAMMA || SEC_LEVEL_EPSILON) || crisis) to_chat(src, "Crisis mode active. Combat module available.") modules += "Combat" @@ -405,7 +415,8 @@ var/list/robot_verbs_default = list( status_flags &= ~CANPUSH choose_icon(6,module_sprites) - radio.config(module.channels) + if(!static_radio_channels) + radio.config(module.channels) notify_ai(2) //for borg hotkeys, here module refers to borg inv slot, not core module @@ -1012,7 +1023,7 @@ var/list/robot_verbs_default = list( dat += text("