Skip to content

Commit

Permalink
catch for no cause data
Browse files Browse the repository at this point in the history
  • Loading branch information
realforest2001 committed Jul 31, 2023
1 parent f8c4b87 commit 7c674ed
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion code/datums/statistics/entities/death_stats.dm
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,10 @@
stack_trace("track_mob_death called with string cause ([cause_data]) instead of datum")
cause_data = create_cause_data(cause_data)

attack_log += "\[[time_stamp()]\] died to [cause_data.cause_name]"
var/log_message = "\[[time_stamp()]\] [key_name(src)] died"
if(cause_data)
log_message += " to [cause_data.cause_name]"
attack_log += "[log_message]."

if(!mind || statistic_exempt)
return
Expand Down

0 comments on commit 7c674ed

Please sign in to comment.