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?