Merge pull request #7057 from Citadel-Station-13/upstream-merge-38396

[MIRROR] Adds logging for sleeper chem injections
This commit is contained in:
deathride58
2018-06-12 03:14:14 +00:00
committed by GitHub
+4 -2
View File
@@ -170,7 +170,7 @@
return
if(mob_occupant.health < min_health && chem != "epinephrine")
return
if(inject_chem(chem))
if(inject_chem(chem, usr))
. = TRUE
if(scrambled_chems && prob(5))
to_chat(usr, "<span class='warning'>Chem System Re-route detected, results may not be as expected!</span>")
@@ -179,9 +179,11 @@
scramble_chem_buttons()
to_chat(user, "<span class='warning'>You scramble the sleeper's user interface!</span>")
/obj/machinery/sleeper/proc/inject_chem(chem)
/obj/machinery/sleeper/proc/inject_chem(chem, mob/user)
if((chem in available_chems) && chem_allowed(chem))
occupant.reagents.add_reagent(chem_buttons[chem], 10) //emag effect kicks in here so that the "intended" chem is used for all checks, for extra FUUU
if(user)
add_logs(user, occupant, "injected [chem] into", additional = "via [src]")
return TRUE
/obj/machinery/sleeper/proc/chem_allowed(chem)