Adds logging to reagent transfers

This commit is contained in:
Jordan Brown
2018-11-02 14:14:28 -04:00
committed by yogstation13-bot
parent eb29d7de0c
commit cedd03dbd9
40 changed files with 89 additions and 82 deletions

View File

@@ -101,7 +101,7 @@
to_chat(user, "<span class='warning'>You cannot directly remove reagents from [target]!</span>")
return
var/trans = target.reagents.trans_to(src, amount_per_transfer_from_this) // transfer from, transfer to - who cares?
var/trans = target.reagents.trans_to(src, amount_per_transfer_from_this, transfered_by = user) // transfer from, transfer to - who cares?
to_chat(user, "<span class='notice'>You fill [src] with [trans] units of the solution. It now contains [reagents.total_volume] units.</span>")
if (reagents.total_volume >= reagents.maximum_volume)
@@ -163,7 +163,7 @@
L.log_message("injected themselves ([contained]) with [src.name]", LOG_ATTACK, color="orange")
var/fraction = min(amount_per_transfer_from_this/reagents.total_volume, 1)
reagents.reaction(L, INJECT, fraction)
reagents.trans_to(target, amount_per_transfer_from_this)
reagents.trans_to(target, amount_per_transfer_from_this, transfered_by = user)
to_chat(user, "<span class='notice'>You inject [amount_per_transfer_from_this] units of the solution. The syringe now contains [reagents.total_volume] units.</span>")
if (reagents.total_volume <= 0 && mode==SYRINGE_INJECT)
mode = SYRINGE_DRAW