From 96ad833a90b9b18b8fc352be38efd93ce4ea57d0 Mon Sep 17 00:00:00 2001 From: NovaBot <154629622+NovaBot13@users.noreply.github.com> Date: Fri, 26 Jan 2024 14:55:59 -0500 Subject: [PATCH] [MIRROR] Fixes reagent transfer logging on organs (#632) * Fixes reagent transfer logging on organs (#81078) ## About The Pull Request Fixes combat log for reagent transfer into organs, closes https://github.com/tgstation/tgstation/issues/80907 ## Changelog Not player-facing. --------- Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com> * Fixes reagent transfer logging on organs --------- Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com> Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com> --- code/modules/reagents/chemistry/holder/holder.dm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/code/modules/reagents/chemistry/holder/holder.dm b/code/modules/reagents/chemistry/holder/holder.dm index 5872f5db1ae..d17affe20fb 100644 --- a/code/modules/reagents/chemistry/holder/holder.dm +++ b/code/modules/reagents/chemistry/holder/holder.dm @@ -532,9 +532,14 @@ remove_reagent(reagent.type, transfer_amount) transfer_log[reagent.type] = list(REAGENT_TRANSFER_AMOUNT = transfer_amount, REAGENT_PURITY = reagent.purity) + //combat log if(transferred_by && target_atom) - target_atom.add_hiddenprint(transferred_by) //log prints so admins can figure out who touched it last. - log_combat(transferred_by, target_atom, "transferred reagents ([get_external_reagent_log_string(transfer_log)]) from [my_atom] to") + var/atom/log_target = target_atom + if(isorgan(target_atom)) + var/obj/item/organ/organ_item = target_atom + log_target = organ_item.owner ? organ_item.owner : organ_item + log_target.add_hiddenprint(transferred_by) //log prints so admins can figure out who touched it last. + log_combat(transferred_by, log_target, "transferred reagents to", my_atom, "which had [get_external_reagent_log_string(transfer_log)]") update_total() target_holder.update_total()