Removes the RCD from engi borgs base kit, and replaces it with a module upgrade (#20449)

* be moved rcd!

* Minor grammar change ~contrabang

Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>

* ert/emag borg get rcd & fixes issue GDN brought up

* Fixes an oversight with getting more than one rcd

Co-Authored-By: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com>

* Remove space from rcd upgrade name

Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com>

---------

Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com>
Co-authored-by: Farie82 <farie82@users.noreply.github.com>
Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com>
This commit is contained in:
1080pCat
2023-03-04 18:56:21 +10:00
committed by GitHub
parent 9b260c4611
commit 6b4feef831
3 changed files with 32 additions and 2 deletions
@@ -13,6 +13,8 @@
var/module_type = null
/// A list of items, and their replacements that this upgrade should replace on installation, in the format of `item_type_to_replace = replacement_item_type`.
var/list/items_to_replace = list()
/// A list of items to add, rather than replace
var/list/items_to_add = list()
/// A list of replacement items will need to be placed into a cyborg module's `special_rechargable` list after this upgrade is installed.
var/list/special_rechargables = list()
@@ -71,6 +73,10 @@
if(replacement_type in special_rechargables)
R.module.special_rechargables += replacement
for(var/item in items_to_add)
var/obj/item/replacement = new item(R.module)
R.module.basic_modules += replacement
R.module?.rebuild_modules()
return TRUE
@@ -398,3 +404,18 @@
cyborg.floorbuffer = FALSE
cyborg = null
return ..()
/obj/item/borg/upgrade/rcd
name = "R.C.D. upgrade"
desc = "A modified rapid construction device, able to pull energy directly from a cyborgs internal power cell."
icon_state = "cyborg_upgrade5"
origin_tech = "engineering=4;materials=5;powerstorage=4"
require_module = TRUE
module_type = /obj/item/robot_module/engineering
items_to_add = list(/obj/item/rcd/borg)
/obj/item/borg/upgrade/rcd/after_install(mob/living/silicon/robot/R)
if(R.emagged) // Emagged engi-borgs have already have the RCD added.
return
R.module.remove_item_from_lists(/obj/item/rcd) // So emagging them in the future won't grant another RCD.
..()