Skip to content

Commit

Permalink
Reduce smoke logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Drulikar committed May 28, 2024
1 parent 2dfa7a5 commit b4ec4bc
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions code/game/objects/effects/effect_system/chemsmoke.dm
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
var/list/targetTurfs
var/list/wallList
var/density

var/static/last_reaction_signature

/datum/effect_system/smoke_spread/chem/New()
..()
Expand Down Expand Up @@ -79,14 +79,19 @@
contained = "\[[contained]\]"
var/area/A = get_area(location)

var/reaction_signature = "[time2text(world.timeofday, "hh:mm")]: ([A.name])[contained] by [carry.my_atom.fingerprintslast]"
if(last_reaction_signature == reaction_signature)
return
last_reaction_signature = reaction_signature

var/where = "[A.name]|[location.x], [location.y]"
var/whereLink = "<A HREF='?_src_=admin_holder;[HrefToken(forceGlobal = TRUE)];adminplayerobservecoodjump=1;X=[location.x];Y=[location.y];Z=[location.z]'>[where]</a>"

if(carry.my_atom.fingerprintslast)
message_admins("A chemical smoke reaction has taken place in ([whereLink])[contained]. Last associated key is [carry.my_atom.fingerprintslast].")
msg_admin_niche("A chemical smoke reaction has taken place in ([whereLink])[contained]. Last associated key is [carry.my_atom.fingerprintslast].")
log_game("A chemical smoke reaction has taken place in ([where])[contained]. Last associated key is [carry.my_atom.fingerprintslast].")
else
message_admins("A chemical smoke reaction has taken place in ([whereLink]). No associated key.")
msg_admin_niche("A chemical smoke reaction has taken place in ([whereLink]). No associated key.")
log_game("A chemical smoke reaction has taken place in ([where])[contained]. No associated key.")


Expand Down

0 comments on commit b4ec4bc

Please sign in to comment.