Skip to content

Commit

Permalink
Makes borg deconstruction drop installed upgrades and an exoskeleton …
Browse files Browse the repository at this point in the history
…(again) (tgstation#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 (tgstation#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 tgstation#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 <[email protected]>
  • Loading branch information
Sealed101 and Ghommie authored Sep 8, 2024
1 parent 1ecf414 commit c956a3f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
7 changes: 2 additions & 5 deletions code/game/objects/items/robot/robot_parts.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
9 changes: 7 additions & 2 deletions code/modules/mob/living/silicon/robot/robot.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c956a3f

Please sign in to comment.