From c956a3ff8d911e057843f2e58510ae3526ea9182 Mon Sep 17 00:00:00 2001 From: Sealed101 Date: Sun, 8 Sep 2024 04:51:15 +0300 Subject: [PATCH] Makes borg deconstruction drop installed upgrades and an exoskeleton (again) (#86480) ## About The Pull Request Borg upgrades would vanish upon deconstruction via lockdown-wrench pipeline, which is inconsistent with them being dropped upon a module change, and it's also kinda scummy. Exoskeletons were not being dropped upon such deconstruction because some melbert guy codered too hard i think haha whoops (#76583) also made borg exoskeleton's part removal process use head and chest's `drop_organs()` to handle flash/cell/wiring removal. it seems to be neater but i could be wrong ## Why It's Good For The Game Fixes #59647 Makes the exoskeleton (the most expensive and vital borg shell piece) drop upon deconstruction again which is nice and cool ## Changelog :cl: fix: fixed borg exoskeletons not dropping when a borg is manually deconstructed fix: borg upgrade modules are now dropped when a borg is deconstructed /:cl: Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com> --- code/game/objects/items/robot/robot_parts.dm | 7 ++----- code/modules/mob/living/silicon/robot/robot.dm | 9 +++++++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/code/game/objects/items/robot/robot_parts.dm b/code/game/objects/items/robot/robot_parts.dm index 7a8196799d87d..14a7c8a1d63a5 100644 --- a/code/game/objects/items/robot/robot_parts.dm +++ b/code/game/objects/items/robot/robot_parts.dm @@ -121,14 +121,11 @@ if(chest) chest.forceMove(drop_to) - new /obj/item/stack/cable_coil(drop_to, 1) - chest.wired = FALSE - chest.cell?.forceMove(drop_to) + chest.drop_organs() if(head) - head.flash1?.forceMove(drop_to) - head.flash2?.forceMove(drop_to) head.forceMove(drop_to) + head.drop_organs() /obj/item/robot_suit/proc/put_in_hand_or_drop(mob/living/user, obj/item/I) //normal put_in_hands() drops the item ontop of the player, this drops it at the suit's loc if(!user.put_in_hands(I)) diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index cddb496158004..2f670c5fbe21b 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -504,14 +504,19 @@ lampButton?.update_appearance() update_icons() +///Completely deconstructs the borg, dropping the MMI/posibrain, removing applied upgrades and stripping the exoskeleton of all limbs, +///while also burning out the flashes and prying out the cabling and the cell used in construction /mob/living/silicon/robot/proc/cyborg_deconstruct() SEND_SIGNAL(src, COMSIG_BORG_SAFE_DECONSTRUCT) if(shell) undeploy() var/turf/drop_to = drop_location() - if (robot_suit) + //remove installed upgrades + for(var/obj/item/borg/upgrade/upgrade_to_remove in upgrades) + upgrade_to_remove.forceMove(drop_to) + if(robot_suit) robot_suit.drop_all_parts(drop_to) - + robot_suit.forceMove(drop_to) else new /obj/item/robot_suit(drop_to) new /obj/item/bodypart/leg/left/robot(drop_to)