From dcdfd44c99a47a61a002a49702624a040709bc42 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Thu, 2 Nov 2023 21:37:54 +0100 Subject: [PATCH] [MIRROR] Fix autosurgeons not respecting implant time [MDB IGNORE] (#24748) * Fix autosurgeons not respecting implant time (#79404) ## About The Pull Request Fixes autosurgeons not respecting the passed implant time in `use_autosurgeon`. Fixes some spans on autosurgeons. I noticed it working on a downstream. ## Changelog This will have 0 effect on /tg/, as the only occurrence of passing an `implant_time`, passed 8 seconds. No, this will not make self-use autosurgery take time. * Fix autosurgeons not respecting implant time --------- Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com> --- code/modules/surgery/organs/autosurgeon.dm | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/code/modules/surgery/organs/autosurgeon.dm b/code/modules/surgery/organs/autosurgeon.dm index 0987df92bd9..921acf808ed 100644 --- a/code/modules/surgery/organs/autosurgeon.dm +++ b/code/modules/surgery/organs/autosurgeon.dm @@ -74,15 +74,21 @@ return if(implant_time) - user.visible_message( "[user] prepares to use [src] on [target].", "You begin to prepare to use [src] on [target].") - if(!do_after(user, (8 SECONDS * surgery_speed), target)) + user.visible_message( + span_notice("[user] prepares to use [src] on [target]."), + span_notice("You begin to prepare to use [src] on [target]."), + ) + if(!do_after(user, (implant_time * surgery_speed), target)) return if(target != user) log_combat(user, target, "autosurgeon implanted [stored_organ] into", "[src]", "in [AREACOORD(target)]") user.visible_message(span_notice("[user] presses a button on [src] as it plunges into [target]'s body."), span_notice("You press a button on [src] as it plunges into [target]'s body.")) else - user.visible_message(span_notice("[user] pressses a button on [src] as it plunges into [user.p_their()] body."), "You press a button on [src] as it plunges into your body.") + user.visible_message( + span_notice("[user] pressses a button on [src] as it plunges into [user.p_their()] body."), + span_notice("You press a button on [src] as it plunges into your body."), + ) stored_organ.Insert(target)//insert stored organ into the user stored_organ = null