Merge pull request #8312 from Kyep/ert_borg_fix

Tweaks/Improves ERT borgs
This commit is contained in:
tigercat2000
2017-11-26 12:37:55 -08:00
committed by GitHub
4 changed files with 31 additions and 5 deletions
+1 -1
View File
@@ -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
@@ -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, "<span class='warning'>Internal diagnostic error: incompatible upgrade module detected.</span>");
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, "<span class='warning'>Internal diagnostic error: incompatible upgrade module detected.</span>");
return
R.emagged = 1
return 1
+3 -1
View File
@@ -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
+20 -3
View File
@@ -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, "<span class='warning'>Rename functionality is not enabled on this unit.</span>");
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, "<span class='warning'>Crisis mode active. Combat module available.</span>")
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("<tr><td>[obj]</td><td><B>Activated</B></td></tr>")
else
dat += text("<tr><td>[obj]</td><td><A HREF=?src=[UID()];act=\ref[obj]>Activate</A></td></tr>")
if(emagged)
if(emagged || weapons_unlock)
if(activated(module.emag))
dat += text("<tr><td>[module.emag]</td><td><B>Activated</B></td></tr>")
else
@@ -1461,6 +1472,12 @@ var/list/robot_verbs_default = list(
req_access = list(access_cent_specops)
ionpulse = 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
radio = new /obj/item/device/radio/borg/ert(src)