Skip to content

Commit

Permalink
[MIRROR] Fixes reagent transfer logging on organs (#632)
Browse files Browse the repository at this point in the history
* Fixes reagent transfer logging on organs (#81078)

## About The Pull Request

Fixes combat log for reagent transfer into organs, closes
tgstation/tgstation#80907

## Changelog
Not player-facing.

---------

Co-authored-by: LemonInTheDark <[email protected]>

* Fixes reagent transfer logging on organs

---------

Co-authored-by: lessthanthree <[email protected]>
Co-authored-by: LemonInTheDark <[email protected]>
  • Loading branch information
3 people authored and FFMirrorBot committed Jan 26, 2024
1 parent a745166 commit 96ad833
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions code/modules/reagents/chemistry/holder/holder.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 96ad833

Please sign in to comment.