* TGUI Say

* Add icon_ref_map.json to make tgui-dev-server stop screaming

* Update tgui.bundle.js

* bundle recompile

---------

Co-authored-by: Heroman3003 <31296024+Heroman3003@users.noreply.github.com>
Co-authored-by: Heroman <alesha3000@list.ru>
This commit is contained in:
ShadowLarkens
2024-08-12 05:48:06 +10:00
committed by GitHub
co-authored by Heroman3003 Heroman
parent bd1d79aebf
commit 7a7920f29e
53 changed files with 2502 additions and 339 deletions
@@ -51,33 +51,6 @@
return loc
/mob/living/carbon/brain/set_typing_indicator(var/state)
if(isturf(loc))
return ..()
if(!is_preference_enabled(/datum/client_preference/show_typing_indicator))
loc.cut_overlay(typing_indicator, TRUE)
return
var/cur_bubble_appearance = custom_speech_bubble
if(!cur_bubble_appearance || cur_bubble_appearance == "default")
cur_bubble_appearance = speech_bubble_appearance()
if(!typing_indicator || cur_typing_indicator != cur_bubble_appearance)
init_typing_indicator("[cur_bubble_appearance]_typing")
if(state && !typing)
add_overlay(typing_indicator, TRUE)
typing = TRUE
typing_indicator_active = typing_indicator
else if(typing)
cut_overlay(typing_indicator_active, TRUE)
typing = FALSE
if(typing_indicator_active != typing_indicator)
qdel(typing_indicator_active)
typing_indicator_active = null
return state
// Vorestation edit start
/mob/living/carbon/brain/verb/backup_ping()
-4
View File
@@ -219,10 +219,6 @@
var/get_rig_stats = 0 //Moved from computer.dm
var/typing
var/obj/effect/decal/typing_indicator
var/obj/effect/decal/typing_indicator_active
var/cur_typing_indicator
var/custom_speech_bubble = "default"
var/low_priority = FALSE //Skip processing life() if there's just no players on this Z-level
+6 -2
View File
@@ -4,6 +4,7 @@
/mob/verb/whisper(message as text)
set name = "Whisper"
set category = "IC"
set hidden = 1
//VOREStation Addition Start
if(forced_psay)
psay(message)
@@ -15,18 +16,21 @@
/mob/verb/say_verb(message as text)
set name = "Say"
set category = "IC"
set hidden = 1
//VOREStation Addition Start
if(forced_psay)
psay(message)
return
//VOREStation Addition End
set_typing_indicator(FALSE)
client?.stop_thinking()
usr.say(message)
/mob/verb/me_verb(message as message)
set name = "Me"
set category = "IC"
set desc = "Emote to nearby people (and your pred/prey)"
set hidden = 1
if(say_disabled) //This is here to try to identify lag problems
to_chat(usr, span_red("Speech is currently admin-disabled."))
@@ -45,7 +49,7 @@
message = sanitize_or_reflect(message,src) //VOREStation Edit - Reflect too-long messages (within reason)
//VOREStation Edit End
set_typing_indicator(FALSE)
client?.stop_thinking()
if(use_me)
custom_emote(usr.emote_type, message)
else
+3 -2
View File
@@ -6,6 +6,7 @@
set name = "Subtle"
set category = "IC"
set desc = "Emote to nearby people (and your pred/prey)"
set hidden = 1
if(say_disabled) //This is here to try to identify lag problems
to_chat(usr, "Speech is currently admin-disabled.")
@@ -18,7 +19,7 @@
if(!message)
return
set_typing_indicator(FALSE)
client?.stop_thinking()
if(use_me)
usr.emote_vr("me",4,message)
else
@@ -40,7 +41,7 @@
if(!message)
return
set_typing_indicator(FALSE)
client?.stop_thinking()
if(use_me)
usr.emote_vr("me",4,message,TRUE)
else
+39 -47
View File
@@ -1,4 +1,4 @@
/proc/generate_speech_bubble(var/bubble_loc, var/speech_state, var/set_layer = FLOAT_LAYER)
/proc/generate_speech_bubble(bubble_loc, speech_state, set_layer = FLOAT_LAYER)
var/image/I = image('icons/mob/talk_vr.dmi', bubble_loc, speech_state, set_layer) //VOREStation Edit - talk_vr.dmi instead of talk.dmi for right-side icons
I.appearance_flags |= (RESET_COLOR|PIXEL_SCALE) //VOREStation Edit
/* //VOREStation Removal Start
@@ -11,77 +11,69 @@
*/ //VOREStation Removal Start
return I
/mob/proc/init_typing_indicator(var/set_state = "typing")
if(typing_indicator)
qdel(typing_indicator)
typing_indicator = null
typing_indicator = new
typing_indicator.appearance = generate_speech_bubble(null, set_state)
typing_indicator.appearance_flags |= (RESET_COLOR|PIXEL_SCALE) //VOREStation Edit
/mob/verb/say_wrapper()
set name = "Say verb"
set category = "IC"
/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)
if(is_preference_enabled(/datum/client_preference/tgui_say))
winset(src, null, "command=[client.tgui_say_create_open_command(SAY_CHANNEL)]")
return
var/cur_bubble_appearance = custom_speech_bubble
if(!cur_bubble_appearance || cur_bubble_appearance == "default")
cur_bubble_appearance = speech_bubble_appearance()
if(!typing_indicator || cur_typing_indicator != cur_bubble_appearance)
init_typing_indicator("[cur_bubble_appearance]_typing")
if(state && !typing)
add_overlay(typing_indicator, TRUE)
typing = TRUE
typing_indicator_active = typing_indicator
else if(typing)
cut_overlay(typing_indicator_active, TRUE)
typing = FALSE
if(typing_indicator_active != typing_indicator)
qdel(typing_indicator_active)
typing_indicator_active = null
return state
/mob/verb/say_wrapper()
set name = ".Say"
set hidden = 1
set_typing_indicator(TRUE)
client?.start_thinking()
client?.start_typing()
var/message = tgui_input_text(usr, "Type your message:", "Say")
set_typing_indicator(FALSE)
client?.stop_thinking()
if(message)
say_verb(message)
/mob/verb/me_wrapper()
set name = ".Me"
set hidden = 1
set name = "Me verb"
set category = "IC"
set_typing_indicator(TRUE)
if(is_preference_enabled(/datum/client_preference/tgui_say))
winset(src, null, "command=[client.tgui_say_create_open_command(ME_CHANNEL)]")
return
client?.start_thinking()
client?.start_typing()
var/message = tgui_input_text(usr, "Type your message:", "Emote", multiline = TRUE)
set_typing_indicator(FALSE)
client?.stop_thinking()
if(message)
me_verb(message)
// No typing indicators here, but this is the file where the wrappers are, so...
/mob/verb/whisper_wrapper()
set name = ".Whisper"
set hidden = 1
set name = "Whisper verb"
set category = "IC"
if(is_preference_enabled(/datum/client_preference/tgui_say))
winset(src, null, "command=[client.tgui_say_create_open_command(WHIS_CHANNEL)]")
return
if(is_preference_enabled(/datum/client_preference/show_typing_indicator_subtle))
client?.start_thinking()
client?.start_typing()
var/message = tgui_input_text(usr, "Type your message:", "Whisper")
client?.stop_thinking()
if(message)
whisper(message)
/mob/verb/subtle_wrapper()
set name = ".Subtle"
set hidden = 1
set name = "Subtle verb"
set category = "IC"
set desc = "Emote to nearby people (and your pred/prey)"
if(is_preference_enabled(/datum/client_preference/tgui_say))
winset(src, null, "command=[client.tgui_say_create_open_command(SUBTLE_CHANNEL)]")
return
if(is_preference_enabled(/datum/client_preference/show_typing_indicator_subtle))
client?.start_thinking()
client?.start_typing()
var/message = tgui_input_text(usr, "Type your message:", "Subtle", multiline = TRUE)
client?.stop_thinking()
if(message)
me_verb_subtle(message)