From a53960989a25cf0175b46fb023511f3f8e508774 Mon Sep 17 00:00:00 2001 From: Kyep Date: Thu, 26 Oct 2017 02:45:35 -0700 Subject: [PATCH 1/3] Tweaks/Improves ERT borgs --- code/_onclick/hud/robot.dm | 2 +- .../objects/items/robot/robot_upgrades.dm | 7 ++++ code/game/response_team.dm | 4 ++- .../modules/mob/living/silicon/robot/robot.dm | 35 +++++++++++++------ 4 files changed, 36 insertions(+), 12 deletions(-) diff --git a/code/_onclick/hud/robot.dm b/code/_onclick/hud/robot.dm index b735d05c3da..f76d480bc48 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.ert_upgrade) 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..2e9889327ea 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.ert_upgrade) + 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.ert_upgrade) + 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 d70293ae10c..54c66c9d2b6 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -50,6 +50,7 @@ var/list/robot_verbs_default = list( var/opened = 0 var/emagged = 0 + var/ert_upgrade = 0 var/wiresexposed = 0 var/locked = 1 var/list/req_access = list(access_robotics) @@ -215,7 +216,9 @@ var/list/robot_verbs_default = list( set category = "Robot Commands" if(custom_name) return 0 - + if(ert_upgrade) + to_chat(src, "ERT borgs cannot change their designation whilst on-mission."); + return 0 rename_self(braintype, 1) /mob/living/silicon/robot/proc/sync() @@ -267,10 +270,13 @@ var/list/robot_verbs_default = list( if(module) return var/list/modules = list("Standard", "Engineering", "Medical", "Miner", "Janitor", "Service") - if(!config.forbid_secborg) - modules += "Security" - if(!config.forbid_peaceborg) - modules += "Peacekeeper" + if(ert_upgrade) + modules = list("Engineering", "Medical", "Security") + else + if(!config.forbid_secborg) + modules += "Security" + if(!config.forbid_peaceborg) + modules += "Peacekeeper" if(security_level == (SEC_LEVEL_GAMMA || SEC_LEVEL_EPSILON) || crisis) to_chat(src, "Crisis mode active. Combat module available.") modules += "Combat" @@ -405,8 +411,9 @@ var/list/robot_verbs_default = list( status_flags &= ~CANPUSH choose_icon(6,module_sprites) - radio.config(module.channels) - notify_ai(2) + if(!ert_upgrade) + radio.config(module.channels) + notify_ai(2) //for borg hotkeys, here module refers to borg inv slot, not core module /mob/living/silicon/robot/verb/cmd_toggle_module(module as num) @@ -751,8 +758,15 @@ var/list/robot_verbs_default = list( var/mob/living/M = user if(!opened)//Cover is closed if(locked) - to_chat(user, "You emag the cover lock.") - locked = 0 + if(ert_upgrade) + if(prob(20)) + to_chat(user, "You successfully emag the cover lock.") + locked = 0 + else + to_chat(user, "You try to emag the cover lock - but it simply blinks red.") + else + to_chat(user, "You emag the cover lock.") + locked = 0 else to_chat(user, "The cover is already unlocked.") return @@ -1012,7 +1026,7 @@ var/list/robot_verbs_default = list( dat += text("[obj]Activated") else dat += text("[obj]Activate") - if(emagged) + if(emagged || ert_upgrade) if(activated(module.emag)) dat += text("[module.emag]Activated") else @@ -1460,6 +1474,7 @@ var/list/robot_verbs_default = list( scrambledcodes = 1 req_access = list(access_cent_specops) ionpulse = 1 + ert_upgrade = 1 /mob/living/silicon/robot/ert/init() laws = new /datum/ai_laws/ert_override From 61a24829816d8bc3f5e346bf1219ebd4cbef5132 Mon Sep 17 00:00:00 2001 From: Kyep Date: Mon, 20 Nov 2017 21:57:20 -0800 Subject: [PATCH 2/3] removes emag resistance --- code/modules/mob/living/silicon/robot/robot.dm | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 54c66c9d2b6..8a972b0b549 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -758,15 +758,8 @@ var/list/robot_verbs_default = list( var/mob/living/M = user if(!opened)//Cover is closed if(locked) - if(ert_upgrade) - if(prob(20)) - to_chat(user, "You successfully emag the cover lock.") - locked = 0 - else - to_chat(user, "You try to emag the cover lock - but it simply blinks red.") - else - to_chat(user, "You emag the cover lock.") - locked = 0 + to_chat(user, "You emag the cover lock.") + locked = 0 else to_chat(user, "The cover is already unlocked.") return From e5db535056ad38e91716892ac3aa1a9d7e02478b Mon Sep 17 00:00:00 2001 From: Kyep Date: Sun, 26 Nov 2017 12:28:47 -0800 Subject: [PATCH 3/3] Tiger requests --- code/_onclick/hud/robot.dm | 2 +- .../objects/items/robot/robot_upgrades.dm | 4 +- .../modules/mob/living/silicon/robot/robot.dm | 37 ++++++++++++------- 3 files changed, 26 insertions(+), 17 deletions(-) diff --git a/code/_onclick/hud/robot.dm b/code/_onclick/hud/robot.dm index f76d480bc48..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 || R.ert_upgrade) + 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 2e9889327ea..4c9bbb38747 100644 --- a/code/game/objects/items/robot/robot_upgrades.dm +++ b/code/game/objects/items/robot/robot_upgrades.dm @@ -68,7 +68,7 @@ /obj/item/borg/upgrade/rename/action(var/mob/living/silicon/robot/R) if(..()) return - if(R.ert_upgrade) + if(!R.allow_rename) to_chat(R, "Internal diagnostic error: incompatible upgrade module detected."); return 0 R.notify_ai(3, R.name, heldname) @@ -218,7 +218,7 @@ if(R.emagged) return - if(R.ert_upgrade) + if(R.weapons_unlock) to_chat(R, "Internal diagnostic error: incompatible upgrade module detected."); return diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 8a972b0b549..4b83bd69788 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -50,7 +50,12 @@ var/list/robot_verbs_default = list( var/opened = 0 var/emagged = 0 - var/ert_upgrade = 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) @@ -216,8 +221,8 @@ var/list/robot_verbs_default = list( set category = "Robot Commands" if(custom_name) return 0 - if(ert_upgrade) - to_chat(src, "ERT borgs cannot change their designation whilst on-mission."); + if(!allow_rename) + to_chat(src, "Rename functionality is not enabled on this unit."); return 0 rename_self(braintype, 1) @@ -270,13 +275,12 @@ var/list/robot_verbs_default = list( if(module) return var/list/modules = list("Standard", "Engineering", "Medical", "Miner", "Janitor", "Service") - if(ert_upgrade) - modules = list("Engineering", "Medical", "Security") - else - if(!config.forbid_secborg) - modules += "Security" - if(!config.forbid_peaceborg) - modules += "Peacekeeper" + if(!config.forbid_secborg) + 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" @@ -411,9 +415,9 @@ var/list/robot_verbs_default = list( status_flags &= ~CANPUSH choose_icon(6,module_sprites) - if(!ert_upgrade) + if(!static_radio_channels) radio.config(module.channels) - notify_ai(2) + notify_ai(2) //for borg hotkeys, here module refers to borg inv slot, not core module /mob/living/silicon/robot/verb/cmd_toggle_module(module as num) @@ -1019,7 +1023,7 @@ var/list/robot_verbs_default = list( dat += text("[obj]Activated") else dat += text("[obj]Activate") - if(emagged || ert_upgrade) + if(emagged || weapons_unlock) if(activated(module.emag)) dat += text("[module.emag]Activated") else @@ -1467,7 +1471,12 @@ var/list/robot_verbs_default = list( scrambledcodes = 1 req_access = list(access_cent_specops) ionpulse = 1 - ert_upgrade = 1 + + force_modules = list("Engineering", "Medical", "Security") + static_radio_channels = 1 + allow_rename = FALSE + weapons_unlock = TRUE + /mob/living/silicon/robot/ert/init() laws = new /datum/ai_laws/ert_override