mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
Fixes an oversight with observers and ghosts (#22101)
* Fix that oversight * woops
This commit is contained in:
@@ -9,8 +9,16 @@
|
||||
/mob/dead/observer/handle_track(message, verb = "says", mob/speaker = null, speaker_name, atom/follow_target, hard_to_hear)
|
||||
return "[speaker_name] ([ghost_follow_link(follow_target, ghost=src)])"
|
||||
|
||||
/mob/dead/observer/handle_speaker_name(mob/speaker = null, vname, hard_to_hear)
|
||||
/mob/dead/observer/handle_speaker_name(mob/speaker = null, vname, hard_to_hear, check_name_against)
|
||||
var/speaker_name = ..()
|
||||
if(speaker && (speaker_name != speaker.real_name) && !isAI(speaker) && !isAutoAnnouncer(speaker)) //Announce computer and various stuff that broadcasts doesn't use it's real name but AI's can't pretend to be other mobs.
|
||||
speaker_name = "[speaker.real_name] ([speaker_name])"
|
||||
if(!speaker)
|
||||
return speaker_name
|
||||
//Announce computer and various stuff that broadcasts doesn't use it's real name but AI's can't pretend to be other mobs.
|
||||
if(isAI(speaker) || isAutoAnnouncer(speaker))
|
||||
return speaker_name
|
||||
if(!check_name_against)
|
||||
check_name_against = speaker_name
|
||||
if(check_name_against == speaker.real_name)
|
||||
return speaker_name
|
||||
speaker_name = "[speaker.real_name] ([speaker_name])"
|
||||
return speaker_name
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
playsound_local(source, speech_sound, sound_vol, 1, sound_frequency)
|
||||
|
||||
|
||||
/mob/proc/hear_radio(list/message_pieces, verb = "says", part_a, part_b, mob/speaker = null, hard_to_hear = 0, vname = "", atom/follow_target, radio_freq)
|
||||
/mob/proc/hear_radio(list/message_pieces, verb = "says", part_a, part_b, mob/speaker = null, hard_to_hear = 0, vname = "", atom/follow_target, check_name_against)
|
||||
if(!client)
|
||||
return
|
||||
|
||||
@@ -137,7 +137,7 @@
|
||||
if(!follow_target)
|
||||
follow_target = speaker
|
||||
|
||||
var/speaker_name = handle_speaker_name(speaker, vname, hard_to_hear)
|
||||
var/speaker_name = handle_speaker_name(speaker, vname, hard_to_hear, check_name_against)
|
||||
track = handle_track(message, verb, speaker, speaker_name, follow_target, hard_to_hear)
|
||||
|
||||
if(!can_hear())
|
||||
|
||||
@@ -731,7 +731,7 @@
|
||||
parrot_hear(html_decode(multilingual_to_message(message_pieces)))
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/parrot/hear_radio(list/message_pieces, verb = "says", part_a, part_b, mob/speaker = null, hard_to_hear = 0, atom/follow_target)
|
||||
/mob/living/simple_animal/parrot/hear_radio(list/message_pieces, verb = "says", part_a, part_b, mob/speaker = null, hard_to_hear = 0, atom/follow_target, check_name_against)
|
||||
if(speaker != src && prob(50))
|
||||
parrot_hear(html_decode(multilingual_to_message(message_pieces)))
|
||||
..()
|
||||
|
||||
Reference in New Issue
Block a user