From 6b4feef8318d4b25e1d2ff292d0470e1ceaa0a7d Mon Sep 17 00:00:00 2001 From: 1080pCat <96908085+1080pCat@users.noreply.github.com> Date: Sat, 4 Mar 2023 18:56:21 +1000 Subject: [PATCH] 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 Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com> --- .../objects/items/robot/robot_upgrades.dm | 21 +++++++++++++++++++ .../mob/living/silicon/robot/robot_modules.dm | 3 +-- .../designs/mechfabricator_designs.dm | 10 +++++++++ 3 files changed, 32 insertions(+), 2 deletions(-) diff --git a/code/game/objects/items/robot/robot_upgrades.dm b/code/game/objects/items/robot/robot_upgrades.dm index f6dc257138b..56087d283a2 100644 --- a/code/game/objects/items/robot/robot_upgrades.dm +++ b/code/game/objects/items/robot/robot_upgrades.dm @@ -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. + ..() diff --git a/code/modules/mob/living/silicon/robot/robot_modules.dm b/code/modules/mob/living/silicon/robot/robot_modules.dm index 82b5876d148..1bbdb6f4c22 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules.dm @@ -359,7 +359,6 @@ module_actions = list(/datum/action/innate/robot_sight/meson) basic_modules = list( /obj/item/flash/cyborg, - /obj/item/rcd/borg, /obj/item/rpd, /obj/item/extinguisher, /obj/item/weldingtool/largetank/cyborg, @@ -383,7 +382,7 @@ /obj/item/stack/sheet/glass/cyborg, /obj/item/stack/sheet/rglass/cyborg ) - emag_modules = list(/obj/item/borg/stun, /obj/item/restraints/handcuffs/cable/zipties/cyborg) + emag_modules = list(/obj/item/borg/stun, /obj/item/restraints/handcuffs/cable/zipties/cyborg, /obj/item/rcd/borg) malf_modules = list(/obj/item/gun/energy/emitter/cyborg) special_rechargables = list(/obj/item/extinguisher, /obj/item/weldingtool/largetank/cyborg, /obj/item/gun/energy/emitter/cyborg) diff --git a/code/modules/research/designs/mechfabricator_designs.dm b/code/modules/research/designs/mechfabricator_designs.dm index 0a0313725f3..682125f7a7c 100644 --- a/code/modules/research/designs/mechfabricator_designs.dm +++ b/code/modules/research/designs/mechfabricator_designs.dm @@ -1108,6 +1108,16 @@ construction_time = 120 category = list("Cyborg Upgrade Modules") +/datum/design/borg_upgrade_rcd + name = "Cyborg Upgrade (Rapid Construction Device)" + id = "borg_upgrade_RCD" + build_type = MECHFAB + build_path = /obj/item/borg/upgrade/rcd + req_tech = list("materials" = 6, "engineering" = 5, "powerstorage" = 5) + materials = list(MAT_METAL=30000, MAT_GLASS=15000,) + construction_time = 120 + category = list("Cyborg Upgrade Modules") + //Misc /datum/design/mecha_tracking name = "Exosuit Tracking Beacon"