Transfer talking and visible messages upwards thru open space.

Mobs speaking and doing things that emit visible messages will now be seen on floors above, including the icons.
This commit is contained in:
Leshana
2017-05-15 20:37:07 -04:00
parent 45fcf086ba
commit d5eb86d810
2 changed files with 45 additions and 2 deletions
+18 -2
View File
@@ -301,6 +301,22 @@ proc/get_radio_key_from_channel(var/channel)
var/image/speech_bubble = image('icons/mob/talk_vr.dmi',src,"h[speech_bubble_test]") //VOREStation Edit - Right-side talk icons
spawn(30) qdel(speech_bubble)
// VOREStation Edit - Attempt Multi-Z Talking
var/mob/above = src.shadow
while(!deleted(above))
var/turf/ST = get_turf(above)
if(ST)
var/list/results = get_mobs_and_objs_in_view_fast(ST, world.view)
var/image/z_speech_bubble = image('icons/mob/talk_vr.dmi', above, "h[speech_bubble_test]")
spawn(30) qdel(z_speech_bubble)
for(var/item in results["mobs"])
if(item != above && !(item in listening))
listening[item] = z_speech_bubble
listening_obj |= results["objs"]
above = above.shadow
// VOREStation Edit End
//Main 'say' and 'whisper' message delivery
for(var/mob/M in listening)
spawn(0) //Using spawns to queue all the messages for AFTER this proc is done, and stop runtimes
@@ -309,12 +325,12 @@ proc/get_radio_key_from_channel(var/channel)
var/dst = get_dist(get_turf(M),get_turf(src))
if(dst <= message_range || M.stat == DEAD) //Inside normal message range, or dead with ears (handled in the view proc)
M << speech_bubble
M << (listening[M] || speech_bubble) // VOREStation Edit - Send the image attached to shadow mob if available
M.hear_say(message, verb, speaking, alt_name, italics, src, speech_sound, sound_vol)
if(whispering) //Don't even bother with these unless whispering
if(dst > message_range && dst <= w_scramble_range) //Inside whisper scramble range
M << speech_bubble
M << (listening[M] || speech_bubble) // VOREStation Edit - Send the image attached to shadow mob if available
M.hear_say(stars(message), verb, speaking, alt_name, italics, src, speech_sound, sound_vol*0.2)
if(dst > w_scramble_range && dst <= world.view) //Inside whisper 'visible' range
M.show_message("<span class='game say'><span class='name'>[src.name]</span> [w_not_heard].</span>", 2)
+27
View File
@@ -83,3 +83,30 @@
. = ..()
if(shadow)
shadow.set_dir(new_dir)
// Transfer messages about what we are doing to upstairs
/mob/visible_message(var/message, var/self_message, var/blind_message)
. = ..()
if(shadow)
shadow.visible_message(message, self_message, blind_message)
// We should show the typing indicator so people above us can tell we're about to talk.
/mob/set_typing_indicator(var/state)
var/old_typing = src.typing
. = ..()
if(shadow && old_typing != src.typing)
shadow.set_typing_indicator(state) // Okay the real proc changed something! That means we should handle things too
/mob/zshadow/set_typing_indicator(var/state)
if(!typing_indicator)
typing_indicator = new
typing_indicator.icon = 'icons/mob/talk_vr.dmi' //VOREStation Edit - Looks better on the right with job icons.
typing_indicator.icon_state = "typing"
if(state && !typing)
overlays += typing_indicator
typing = 1
else if(!state && typing)
overlays -= typing_indicator
typing = 0
if(shadow)
shadow.set_typing_indicator(state)