mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
Refactors logging into a single var for all mobs and adds a wrapper for proper logging.
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user