POLARIS: Improve robot and typing overlays

This commit is contained in:
Arokha Sieyes
2018-03-17 19:49:03 -04:00
committed by Neerti
parent ebeb513b31
commit f75ea72480
7 changed files with 32 additions and 61 deletions

View File

@@ -1,41 +1,34 @@
/mob/proc/set_typing_indicator(var/state) //Leaving this here for mobs.
if(!is_preference_enabled(/datum/client_preference/show_typing_indicator))
cut_overlay(typing_indicator, TRUE)
return
if(!typing_indicator)
typing_indicator = new
typing_indicator.icon = 'icons/mob/talk.dmi'
typing_indicator.icon_state = "[speech_bubble_appearance()]_typing"
if(client && !stat)
typing_indicator.invisibility = invisibility
if(!is_preference_enabled(/datum/client_preference/show_typing_indicator))
add_overlay(typing_indicator)
else
if(state)
if(!typing)
add_overlay(typing_indicator)
typing = 1
else
if(typing)
cut_overlay(typing_indicator)
typing = 0
return state
if(state && !typing)
add_overlay(typing_indicator, TRUE)
typing = TRUE
else if(typing)
cut_overlay(typing_indicator, TRUE)
typing = FALSE
if(shadow) //Multi-Z above-me shadows
shadow.set_typing_indicator(state)
return state
/mob/verb/say_wrapper()
set name = ".Say"
set hidden = 1
if(!ishuman(src)) //If they're a mob, use the old code.
set_typing_indicator(1)
else if(is_preference_enabled(/datum/client_preference/show_typing_indicator))
hud_typing = 1
set_typing_indicator(TRUE)
var/message = input("","say (text)") as text
if(!ishuman(src)) //If they're a mob, use the old code.
set_typing_indicator(0)
else if(is_preference_enabled(/datum/client_preference/show_typing_indicator))
hud_typing = 0
set_typing_indicator(FALSE)
if(message)
say_verb(message)
@@ -43,17 +36,9 @@
set name = ".Me"
set hidden = 1
if(!ishuman(src)) //If they're a mob, use the old code.
set_typing_indicator(1)
else if(is_preference_enabled(/datum/client_preference/show_typing_indicator))
hud_typing = 1
set_typing_indicator(TRUE)
var/message = input("","me (text)") as text
if(is_preference_enabled(/datum/client_preference/show_typing_indicator))
hud_typing = 0
else if(!ishuman(src)) //If they're a mob, use the old code.
set_typing_indicator(0)
set_typing_indicator(FALSE)
if(message)
me_verb(message)