mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 11:05:03 +01:00
Mumbles
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
gas_transfer_coefficient = 0.90
|
||||
put_on_delay = 20
|
||||
var/resist_time = 0 //deciseconds of how long you need to gnaw to get rid of the gag, 0 to make it impossible to remove
|
||||
var/mute = 1 // 1 - completely mutes you, 0 - muffles everything you say "MHHPHHMMM!!!"
|
||||
species_fit = list("Vox")
|
||||
sprite_sheets = list(
|
||||
"Vox" = 'icons/mob/species/vox/mask.dmi'
|
||||
@@ -32,6 +33,7 @@
|
||||
item_state = null
|
||||
w_class = 1
|
||||
resist_time = 150
|
||||
mute = 0
|
||||
species_fit = list("Unathi", "Tajaran", "Vulpkanin")
|
||||
sprite_sheets = list(
|
||||
"Unathi" = 'icons/mob/species/unathi/mask.dmi',
|
||||
|
||||
@@ -166,11 +166,13 @@ proc/get_radio_key_from_channel(var/channel)
|
||||
verb = say_quote(message, speaking)
|
||||
|
||||
if(is_muzzled())
|
||||
if(istype(wear_mask, /obj/item/clothing/mask/muzzle/tapegag)) //just for tape
|
||||
to_chat(src, "<span class='danger'>Your mouth is taped and you cannot speak!</span>")
|
||||
else
|
||||
var/obj/item/clothing/mask/muzzle/G = wear_mask
|
||||
if(G.mute) //if the mask is supposed to mute you completely or just muffle you
|
||||
to_chat(src, "<span class='danger'>You're muzzled and cannot speak!</span>")
|
||||
return
|
||||
return
|
||||
else
|
||||
message = muffledspeech(message)
|
||||
verb = "mumbles"
|
||||
|
||||
message = trim_left(message)
|
||||
|
||||
@@ -359,7 +361,10 @@ proc/get_radio_key_from_channel(var/channel)
|
||||
return
|
||||
|
||||
if(is_muzzled())
|
||||
to_chat(src, "<span class='danger'>You're muzzled and cannot speak!</span>")
|
||||
if(istype(wear_mask, /obj/item/clothing/mask/muzzle/tapegag)) //just for tape
|
||||
to_chat(src, "<span class='danger'>Your mouth is taped and you cannot speak!</span>")
|
||||
else
|
||||
to_chat(src, "<span class='danger'>You're muzzled and cannot speak!</span>")
|
||||
return
|
||||
|
||||
var/message_range = 1
|
||||
|
||||
@@ -412,6 +412,24 @@ proc/Gibberish(t, p)//t is the inputted message, and any value higher than 70 fo
|
||||
|
||||
return returntext
|
||||
|
||||
proc/muffledspeech(phrase)
|
||||
phrase = html_decode(phrase)
|
||||
var/leng=lentext(phrase)
|
||||
var/counter=lentext(phrase)
|
||||
var/newphrase=""
|
||||
var/newletter=""
|
||||
while(counter>=1)
|
||||
newletter=copytext(phrase,(leng-counter)+1,(leng-counter)+2)
|
||||
if(newletter in list(" ", "!", "?", ".", ","))
|
||||
//do nothing
|
||||
else if(lowertext(newletter) in list("a", "e", "i", "o", "u", "y"))
|
||||
newletter = "h"
|
||||
else
|
||||
newletter = "m"
|
||||
newphrase+="[newletter]"
|
||||
counter-=1
|
||||
return newphrase
|
||||
|
||||
|
||||
/proc/shake_camera(mob/M, duration, strength=1)
|
||||
if(!M || !M.client || M.shakecamera)
|
||||
|
||||
Reference in New Issue
Block a user