From 926dff2cf1d9860fb94f5b6ac38501f75d63213f Mon Sep 17 00:00:00 2001 From: CRUNCH <143041327+Fordoxia@users.noreply.github.com> Date: Mon, 18 Mar 2024 17:44:27 +0000 Subject: [PATCH] Cyborgs drop their upgrades on the floor when reset or deconstructed (#24467) * Fixing some minor typos for cyborg upgrade flavour text Throws in some missing apostrophes, capitalisation, and the letter "s." * Briefcase Full of Cash buff Increases the amount of cash in the Syndicate Briefcase Full of Cash from 600 Cr to 1000 Cr * Reverts double-feature PR * Reverts a broken revert * Reverting again because Ebba told me to * And reverting yet again * yes * Update robot_mob.dm * Update robot_mob.dm * Update code/modules/mob/living/silicon/robot/robot_mob.dm Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> --------- Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> --- .../modules/mob/living/silicon/robot/!robot_mob.dm | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/code/modules/mob/living/silicon/robot/!robot_mob.dm b/code/modules/mob/living/silicon/robot/!robot_mob.dm index 30ef3f5dfff..64587ae84ad 100644 --- a/code/modules/mob/living/silicon/robot/!robot_mob.dm +++ b/code/modules/mob/living/silicon/robot/!robot_mob.dm @@ -607,6 +607,12 @@ GLOBAL_LIST_INIT(robot_verbs_default, list( SSstatpanels.set_status_tab(client) SSblackbox.record_feedback("tally", "cyborg_modtype", 1, "[lowertext(selected_module)]") notify_ai(2) +/// Take the borg's upgrades and spill them on the floor +/mob/living/silicon/robot/proc/spill_upgrades() + for(var/obj/item/borg/upgrade/U in contents) + if(istype(U, /obj/item/borg/upgrade/reset)) // The reset module is supposed to be consumed on use, this stops it from dropping on the floor if used + QDEL_NULL(U) + U.forceMove(get_turf(src)) /mob/living/silicon/robot/proc/reset_module() notify_ai(2) @@ -634,7 +640,8 @@ GLOBAL_LIST_INIT(robot_verbs_default, list( update_icons() update_headlamp() - speed = 0 // Remove upgrades. + spill_upgrades() + speed = 0 // Strip lingering upgrade effects. ionpulse = FALSE weapons_unlock = FALSE add_language("Robot Talk", TRUE) @@ -642,10 +649,6 @@ GLOBAL_LIST_INIT(robot_verbs_default, list( weather_immunities -= "lava" armor = getArmor(arglist(initial(armor))) - for(var/obj/item/borg/upgrade/U in contents) - QDEL_NULL(U) - //This is needed so that upgrades can be installed again after the borg's module is reset. - status_flags |= CANPUSH //for borg hotkeys, here module refers to borg inv slot, not core module @@ -1017,6 +1020,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list( to_chat(user, "You jam the crowbar into the robot and begin levering the securing bolts...") if(I.use_tool(src, user, 30, volume = I.tool_volume)) user.visible_message("[user] deconstructs [src]!", "You unfasten the securing bolts, and [src] falls to pieces!") + spill_upgrades() deconstruct() return // Okay we're not removing the cell or an MMI, but maybe something else?