From 65b6c059ff1edbef9bd419bf8e0d7d682487d4f6 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Sat, 7 Jan 2023 17:28:06 +0100 Subject: [PATCH] [MIRROR] Removing an organ from a autosurgeon now correctly updates its overlays + 2 more bonus autosurgeon fixes [MDB IGNORE] (#18565) * Removing an organ from a autosurgeon now correctly updates its overlays + 2 more bonus autosurgeon fixes (#72471) Removing an organ from an auto-surgeon with a screwdriver didn't call update_appearance() and thus it kept its overlay as if it was full. Fixes single use autosurgeons not consuming uses when their implant is removed, this was a bug introduced by #68379 Autosurgeons now actually tell you what organ was removed from them. * Removing an organ from a autosurgeon now correctly updates its overlays + 2 more bonus autosurgeon fixes Co-authored-by: NamelessFairy <40036527+NamelessFairy@users.noreply.github.com> --- code/modules/surgery/organs/autosurgeon.dm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/code/modules/surgery/organs/autosurgeon.dm b/code/modules/surgery/organs/autosurgeon.dm index a171aec016a..0987df92bd9 100644 --- a/code/modules/surgery/organs/autosurgeon.dm +++ b/code/modules/surgery/organs/autosurgeon.dm @@ -119,10 +119,15 @@ var/atom/drop_loc = user.drop_location() for(var/atom/movable/stored_implant as anything in src) stored_implant.forceMove(drop_loc) + to_chat(user, span_notice("You remove the [stored_organ] from [src].")) stored_organ = null - to_chat(user, span_notice("You remove the [stored_organ] from [src].")) screwtool.play_tool_sound(src) + if (uses) + uses-- + if(!uses) + desc = "[initial(desc)] Looks like it's been used up." + update_appearance(UPDATE_ICON) return TRUE /obj/item/autosurgeon/medical_hud