Move modulator voice logic out of for loop so it has priority

This commit is contained in:
Stokes52
2021-05-08 12:05:32 -07:00
parent 9160dfa3fe
commit fc5dabe1fb
+7 -6
View File
@@ -165,14 +165,15 @@
S.message = uppertext(S.message)
verb = "yells loudly"
if(istype(wear_mask, /obj/item/clothing/mask/gas/voice_modulator))
var/obj/item/clothing/mask/gas/voice_modulator/VM = wear_mask
var/obj/item/voice_changer/changer = VM.voice_modulator
if (changer.active)
verb = pick("modulates", "drones", "hums", "buzzes")
if(span)
S.message = "<span class='[span]'>[S.message]</span>"
if(istype(wear_mask, /obj/item/clothing/mask/gas/voice_modulator))
var/obj/item/clothing/mask/gas/voice_modulator/VM = wear_mask
var/obj/item/voice_changer/changer = VM.voice_modulator
if (changer.active)
verb = pick("modulates", "drones", "hums", "buzzes")
return list("verb" = verb)
/mob/living/carbon/human/handle_message_mode(message_mode, list/message_pieces, verb, used_radios)