Merge pull request #15215 from silicons/afk_tracking

fixes afk detection
This commit is contained in:
Putnam3145
2021-10-11 15:52:03 -07:00
committed by GitHub
5 changed files with 21 additions and 0 deletions

View File

@@ -4,6 +4,7 @@
set name = "say_indicator"
set hidden = TRUE
set category = "IC"
client?.last_activity = world.time
display_typing_indicator()
var/message = input(usr, "", "say") as text|null
// If they don't type anything just drop the message.
@@ -21,12 +22,16 @@
to_chat(usr, "<span class='danger'>Speech is currently admin-disabled.</span>")
return
clear_typing_indicator() // clear it immediately!
client?.last_activity = world.time
say(message)
/mob/verb/me_typing_indicator()
set name = "me_indicator"
set hidden = TRUE
set category = "IC"
client?.last_activity = world.time
display_typing_indicator()
var/message = input(usr, "", "me") as message|null
// If they don't type anything just drop the message.
@@ -52,6 +57,8 @@
message = trim(copytext_char(sanitize(message), 1, MAX_MESSAGE_LEN))
clear_typing_indicator() // clear it immediately!
client?.last_activity = world.time
usr.emote("me",1,message,TRUE)
/mob/say_mod(input, message_mode)
@@ -73,6 +80,7 @@
return lowertext(copytext_char(input, 1, customsayverb))
/mob/proc/whisper_keybind()
client?.last_activity = world.time
var/message = input(src, "", "whisper") as text|null
if(!length(message))
return
@@ -89,6 +97,7 @@
whisper(message)
/mob/proc/whisper(message, datum/language/language=null)
client?.last_activity = world.time
say(message, language) //only living mobs actually whisper, everything else just talks
/mob/proc/say_dead(var/message)
@@ -132,6 +141,7 @@
message = emoji_parse(message)
var/rendered = "<span class='game deadsay'><span class='prefix'>DEAD:</span> <span class='name'>[name]</span>[alt_name] <span class='message'>[emoji_parse(spanned)]</span></span>"
log_talk(message, LOG_SAY, tag="DEAD")
client?.last_activity = world.time
deadchat_broadcast(rendered, follow_target = src, speaker_key = key)
/mob/proc/check_emote(message)