mirror of
https://github.com/Citadel-Station-13/Citadel-Station-13-RP.git
synced 2026-08-31 14:07:09 +01:00
* dme and dmb * Heeeere we gooo * fasease * Continued. * AAAAAAAAAAAAAAAAAAAAAAAA * Brain going numb * agh * The suffering will be worth it... right? * Going blank... * Am I done? * AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA * Fixes * Should be everything I care about right now.
54 lines
1.4 KiB
Plaintext
54 lines
1.4 KiB
Plaintext
/proc/generate_speech_bubble(var/bubble_loc, var/speech_state, var/set_layer = FLOAT_LAYER)
|
|
var/image/I = image('icons/mob/talk_vr.dmi', bubble_loc, speech_state, set_layer)
|
|
I.appearance_flags |= (RESET_COLOR|PIXEL_SCALE)
|
|
return I
|
|
|
|
/mob/proc/init_typing_indicator(var/set_state = "typing")
|
|
typing_indicator = new
|
|
typing_indicator.appearance = generate_speech_bubble(null, set_state)
|
|
typing_indicator.appearance_flags |= (RESET_COLOR|PIXEL_SCALE)
|
|
|
|
/mob/proc/set_typing_indicator(var/state) //Leaving this here for mobs.
|
|
|
|
if(!is_preference_enabled(/datum/client_preference/show_typing_indicator))
|
|
if(typing_indicator)
|
|
cut_overlay(typing_indicator, TRUE)
|
|
return
|
|
|
|
if(!typing_indicator)
|
|
init_typing_indicator("[speech_bubble_appearance()]_typing")
|
|
|
|
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
|
|
|
|
set_typing_indicator(TRUE)
|
|
var/message = input("","say (text)") as text|null
|
|
set_typing_indicator(FALSE)
|
|
|
|
if(message)
|
|
say_verb(message)
|
|
|
|
/mob/verb/me_wrapper()
|
|
set name = ".Me"
|
|
set hidden = 1
|
|
|
|
set_typing_indicator(TRUE)
|
|
var/message = input("","me (text)") as message|null
|
|
set_typing_indicator(FALSE)
|
|
|
|
if(message)
|
|
me_verb(message)
|