Allows defib units to be used as medical borg upgrades, adds message to borgs when they recieve an upgrade, re-organizes borg attackby(). (#48805)

* Delete stale.yml

* Create stale.yml

* clear

* Can now replace the defib pack with an upgrade card to get the pack back.

* less redundant checks

* borg > cyborg text changes
This commit is contained in:
zxaber
2020-02-02 22:08:40 -05:00
committed by GitHub
parent fcc925b79b
commit 79e59077eb
3 changed files with 237 additions and 191 deletions
@@ -428,10 +428,18 @@
icon_state = "cyborg_upgrade3"
require_module = 1
module_type = list(/obj/item/robot_module/medical)
var/backpack = FALSE //True if we get the defib from a physical backpack unit rather than an upgrade card, so that we can return that upon deactivate()
/obj/item/borg/upgrade/defib/backpack
backpack = TRUE
/obj/item/borg/upgrade/defib/action(mob/living/silicon/robot/R, user = usr)
. = ..()
if(.)
var/obj/item/borg/upgrade/defib/backpack/BP = locate() in R //If a full defib unit was used to upgrade prior, we can just pop it out now and replace
if(BP)
BP.deactivate(R, user)
to_chat(user, "<span class='notice'>You remove the defibrillator unit to make room for the compact upgrade.</span>")
var/obj/item/twohanded/shockpaddles/cyborg/S = new(R.module)
R.module.basic_modules += S
R.module.add_module(S, FALSE, TRUE)
@@ -441,6 +449,10 @@
if (.)
var/obj/item/twohanded/shockpaddles/cyborg/S = locate() in R.module
R.module.remove_module(S, TRUE)
if(backpack)
new /obj/item/defibrillator(get_turf(R))
qdel(src)
/obj/item/borg/upgrade/processor
name = "medical cyborg surgical processor"