mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 20:16:55 +01:00
Add a generic proc for changing speech verb when wearking a mask
This commit is contained in:
@@ -428,6 +428,10 @@ BLIND // can't see anything
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtonIcon()
|
||||
|
||||
// Changes the speech verb when wearing a mask if a value is returned
|
||||
/obj/item/clothing/mask/proc/change_speech_verb()
|
||||
return
|
||||
|
||||
//Shoes
|
||||
/obj/item/clothing/shoes
|
||||
name = "shoes"
|
||||
|
||||
@@ -145,6 +145,11 @@
|
||||
if(silent || HAS_TRAIT(src, TRAIT_MUTE))
|
||||
S.message = ""
|
||||
|
||||
if(wear_mask)
|
||||
var/speech_verb_when_masked = wear_mask.change_speech_verb()
|
||||
if(speech_verb_when_masked)
|
||||
verb = speech_verb_when_masked
|
||||
|
||||
if(istype(wear_mask, /obj/item/clothing/mask/horsehead))
|
||||
var/obj/item/clothing/mask/horsehead/hoers = wear_mask
|
||||
if(hoers.voicechange)
|
||||
@@ -168,11 +173,6 @@
|
||||
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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user