Refactors logging into a single var for all mobs and adds a wrapper for proper logging.

This commit is contained in:
Lzimann
2017-03-04 13:32:35 -03:00
parent 15e8b7e5f7
commit e58ee1724f
32 changed files with 89 additions and 91 deletions

View File

@@ -222,7 +222,7 @@
/mob/living/verb/succumb(whispered as null)
set hidden = 1
if (InCritical())
src.attack_log += "[src] has [whispered ? "whispered his final words" : "succumbed to death"] with [round(health, 0.1)] points of health!"
src.log_message("Has [whispered ? "whispered his final words" : "succumbed to death"] with [round(health, 0.1)] points of health!", INDIVIDUAL_ATTACK_LOG)
src.adjustOxyLoss(src.health - HEALTH_THRESHOLD_DEAD)
updatehealth()
if(!whispered)

View File

@@ -79,12 +79,12 @@ var/list/crit_allowed_modes = list(MODE_WHISPER,MODE_CHANGELING,MODE_ALIEN)
message = copytext(message, 3)
if(findtext(message, " ", 1, 2))
message = copytext(message, 2)
if(message_mode == "admin")
if(client)
client.cmd_admin_say(message)
return
if(message_mode == "deadmin")
if(client)
client.dsay(message)
@@ -116,7 +116,7 @@ var/list/crit_allowed_modes = list(MODE_WHISPER,MODE_CHANGELING,MODE_ALIEN)
spans += get_spans()
//Log what we've said with an associated timestamp, using the list's len for safety/to prevent overwriting messages
say_log["[LAZYLEN(say_log) + 1]\[[time_stamp()]\]"] = message
log_message(message, INDIVIDUAL_SAY_LOG)
var/message_range = 7
var/radio_return = radio(message, message_mode, spans)