mirror of
https://github.com/Sandstorm-Station/Sandstorm-Station-13.git
synced 2026-08-19 03:07:20 +01:00
fixes double indicators?
This commit is contained in:
@@ -1,8 +0,0 @@
|
||||
/mob/key_down(_key, client/user)
|
||||
if(user.prefs.toggles & ASYNCHRONOUS_SAY)
|
||||
switch(_key)
|
||||
if("T")
|
||||
src.set_typing_indicator(TRUE)
|
||||
if("M")
|
||||
src.set_typing_indicator(TRUE)
|
||||
return ..()
|
||||
@@ -13,10 +13,6 @@
|
||||
animate(I, alpha = 255, time = 5, easing = BOUNCE_EASING, pixel_y = 10)
|
||||
QDEL_IN_CLIENT_TIME(I, time)
|
||||
|
||||
/mob/emote(act, m_type = null, message = null, intentional = FALSE)
|
||||
. = ..()
|
||||
set_typing_indicator(FALSE)
|
||||
|
||||
/datum/emote/living/peep
|
||||
key = "peep"
|
||||
key_third_person = "peeps like a bird"
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
/mob/Moved(atom/OldLoc, Dir, Forced = FALSE)
|
||||
. = ..()
|
||||
set_typing_indicator(FALSE)
|
||||
@@ -1,39 +0,0 @@
|
||||
/mob
|
||||
var/hud_typing = FALSE //set when typing in an input window instead of chatline
|
||||
var/typing
|
||||
var/last_typed
|
||||
var/last_typed_time
|
||||
|
||||
var/static/mutable_appearance/typing_indicator
|
||||
|
||||
/mob/proc/set_typing_indicator(var/state)
|
||||
if(!typing_indicator)
|
||||
typing_indicator = mutable_appearance('sandcode/icons/mob/typing_indicator.dmi', "default0", FLY_LAYER)
|
||||
if(client && !stat)
|
||||
if(state)
|
||||
if(!typing)
|
||||
add_overlay(typing_indicator)
|
||||
typing = TRUE
|
||||
else
|
||||
if(typing)
|
||||
cut_overlay(typing_indicator)
|
||||
typing = FALSE
|
||||
return state
|
||||
|
||||
/mob/proc/handle_typing_indicator()
|
||||
if(!client)
|
||||
return
|
||||
var/temp = winget(client, "input", "text")
|
||||
|
||||
if (temp != last_typed)
|
||||
last_typed = temp
|
||||
last_typed_time = world.time
|
||||
|
||||
if(length(temp) > 5 && findtext(temp, "Say \"", 1, 7))
|
||||
set_typing_indicator(TRUE)
|
||||
return
|
||||
if(length(temp) > 3 && findtext(temp, "Me ", 1, 5))
|
||||
set_typing_indicator(TRUE)
|
||||
return
|
||||
if(!hud_typing)
|
||||
set_typing_indicator(FALSE)
|
||||
Reference in New Issue
Block a user