Improved chem grenade logging

This commit is contained in:
ShizCalev
2018-06-11 00:11:44 -04:00
parent be7911c77b
commit c1617ef9a0
2 changed files with 24 additions and 1 deletions
@@ -289,7 +289,7 @@
if(M)
more = "[ADMIN_LOOKUPFLW(M)] "
message_admins("Smoke: ([whereLink])[contained]. Key: [more ? more : carry.my_atom.fingerprintslast].")
log_game("A chemical smoke reaction has taken place in ([where])[contained]. Last associated key is [carry.my_atom.fingerprintslast].")
log_game("A chemical smoke reaction has taken place in ([where])[contained]. Last touched by [carry.my_atom.fingerprintslast].")
else
message_admins("Smoke: ([whereLink])[contained]. No associated key.")
log_game("A chemical smoke reaction has taken place in ([where])[contained]. No associated key.")
@@ -75,6 +75,10 @@
return
to_chat(user, "<span class='notice'>You add [I] to the [initial(name)] assembly.</span>")
beakers += I
for(var/datum/reagent/R in I.reagents.reagent_list)
var/reagent_vol = R.volume
add_logs(user, src, "inserted [I]", additional = "[reagent_vol] units of [R] inside.")
log_game("[key_name(user)] inserted [I] into [src] containing [reagent_vol] units of [R] ")
else
to_chat(user, "<span class='warning'>[I] is empty!</span>")
@@ -111,6 +115,12 @@
if(beakers.len)
for(var/obj/O in beakers)
O.forceMove(drop_location())
if(!O.reagents)
continue
for(var/datum/reagent/R in O.reagents.reagent_list)
var/reagent_vol = R.volume
add_logs(user, src, "removed [O]", additional = "[reagent_vol] units of [R] inside.")
log_game("[key_name(user)] removed [O] from [src] containing [reagent_vol] units of [R]")
beakers = list()
to_chat(user, "<span class='notice'>You open the [initial(name)] assembly and remove the payload.</span>")
return // First use of the wrench remove beakers, then use the wrench to remove the activation mechanism.
@@ -155,6 +165,19 @@
if(nadeassembly)
nadeassembly.on_found(finder)
/obj/item/grenade/chem_grenade/log_grenade(mob/user, turf/T)
..()
for(var/obj/exploded_beaker in beakers)
if(!exploded_beaker.reagents)
continue
for(var/datum/reagent/R in exploded_beaker.reagents.reagent_list)
var/reagent_volume = R.volume
var/message = "[src] primed by [user] at [ADMIN_VERBOSEJMP(T)] contained [reagent_volume] units of [R]."
GLOB.bombers += message
message_admins(message)
log_game("[src] primed by [user] at [AREACOORD(T)] contained [reagent_volume] units of [R].")
add_logs(user, src, "primed", additional = "[reagent_volume] units of [R] inside.")
/obj/item/grenade/chem_grenade/prime()
if(stage != READY)
return