diff --git a/GainStation13/code/game/sound.dm b/GainStation13/code/game/sound.dm new file mode 100644 index 00000000..9546ce94 --- /dev/null +++ b/GainStation13/code/game/sound.dm @@ -0,0 +1,32 @@ +/proc/gs13_get_sfx(soundin) + if(istext(soundin)) + switch(soundin) + if("belch") + soundin = pick( 'GainStation13/sound/voice/belch1.ogg', + 'GainStation13/sound/voice/belch2.ogg', + 'GainStation13/sound/voice/belch3.ogg', + 'GainStation13/sound/voice/belch4.ogg', + 'GainStation13/sound/voice/belch5.ogg', + 'GainStation13/sound/voice/belch6.ogg') + if("brap") + soundin = pick( 'GainStation13/sound/voice/brap1.ogg', + 'GainStation13/sound/voice/brap2.ogg', + 'GainStation13/sound/voice/brap3.ogg', + 'GainStation13/sound/voice/brap4.ogg', + 'GainStation13/sound/voice/brap5.ogg', + 'GainStation13/sound/voice/brap6.ogg', + 'GainStation13/sound/voice/brap7.ogg', + 'GainStation13/sound/voice/brap8.ogg') + if("burp") + soundin = pick( 'GainStation13/sound/voice/burp1.ogg') + if("burunyu") + soundin = pick( 'GainStation13/sound/voice/funnycat.ogg') + if("fart") + soundin = pick( 'GainStation13/sound/voice/fart1.ogg', + 'GainStation13/sound/voice/fart2.ogg', + 'GainStation13/sound/voice/fart3.ogg', + 'GainStation13/sound/voice/fart4.ogg') + if("gurgle") + soundin = pick( 'GainStation13/sound/voice/gurgle1.ogg', + 'GainStation13/sound/voice/gurgle2.ogg') + return soundin diff --git a/GainStation13/code/modules/mob/living/brap.dm b/GainStation13/code/modules/mob/living/brap.dm deleted file mode 100644 index 762279ad..00000000 --- a/GainStation13/code/modules/mob/living/brap.dm +++ /dev/null @@ -1,20 +0,0 @@ -/datum/emote/living/brap - key = "brap" - key_third_person = "braps" - message = " " - emote_type = EMOTE_AUDIBLE - -/datum/emote/living/brap/select_message_type(var/mob/user) - return pick("farts loudly!", "cuts a fat one!", "rips absolute ass!") - -/datum/emote/living/brap/run_emote(var/mob/living/user, params) - if(!ishuman(user)) - return FALSE - - var/turf/source = get_turf(user) - var/sound/farting = sound(get_sfx("fart")) - for(var/mob/living/M in get_hearers_in_view(3, source)) - if(M.client && M.client.prefs.cit_toggles & FARTING_NOISES) - SEND_SOUND(M, farting) - - . = ..() diff --git a/GainStation13/code/modules/mob/living/emote.dm b/GainStation13/code/modules/mob/living/emote.dm index 35a21417..551d0b2a 100644 --- a/GainStation13/code/modules/mob/living/emote.dm +++ b/GainStation13/code/modules/mob/living/emote.dm @@ -1,3 +1,74 @@ +/datum/emote/living/proc/make_noise(var/mob/living/user, noise_name, pref_toggle) + if(!ishuman(user)) + return FALSE + + var/turf/source = get_turf(user) + var/sound/noise = sound(gs13_get_sfx(noise_name)) + for(var/mob/living/M in get_hearers_in_view(3, source)) + if ((pref_toggle == 0) || (M.client && M.client.prefs.cit_toggles & pref_toggle)) + SEND_SOUND(M, noise) + +/datum/emote/living/belch + key = "belch" + key_third_person = "belches loudly" + message = "belches" + emote_type = EMOTE_AUDIBLE + //god hates me for this -Metha + +/datum/emote/living/belch/run_emote(mob/living/user, params) + if(!ishuman(user)) + return FALSE + + make_noise(user, "belch", 0) + + . = ..() + +/datum/emote/living/brap + key = "brap" + key_third_person = "braps" + message = " " + emote_type = EMOTE_AUDIBLE + +/datum/emote/living/brap/select_message_type(var/mob/living/user) + return pick("farts loudly!", "cuts a fat one!", "rips absolute ass!") + +/datum/emote/living/brap/run_emote(var/mob/living/user, params) + if(!ishuman(user)) + return FALSE + + make_noise(user, "brap", FARTING_NOISES) + + . = ..() + +/datum/emote/living/burp + key = "burp" + key_third_person = "burps" + message = "burps." + emote_type = EMOTE_AUDIBLE + +/datum/emote/living/burp/run_emote(mob/living/user, params) + if(!ishuman(user)) + return FALSE + + make_noise(user, "burp", 0) + + . = ..() + +/datum/emote/living/fart + key = "fart" + key_third_person = "farts" + message = "farts" + emote_type = EMOTE_AUDIBLE + //god hates me for this -Metha + +/datum/emote/living/fart/run_emote(mob/living/user, params) + if(!ishuman(user)) + return FALSE + + make_noise(user, "fart", FARTING_NOISES) + + . = ..() + /datum/emote/living/gurgle key = "gurgle" key_third_person = "gurgles" @@ -8,46 +79,10 @@ if(!ishuman(user)) return FALSE - if(prob(50)) - playsound(user, 'GainStation13/sound/voice/gurgle1.ogg', 50, 1, -1) - else - playsound(user, 'GainStation13/sound/voice/gurgle2.ogg', 50, 1, -1) + make_noise(user, "gurgle", 0) . = ..() -/datum/emote/living/burp/run_emote(mob/living/user, params) - if(!ishuman(user)) - return FALSE - - playsound(user, 'GainStation13/sound/voice/burp1.ogg', 50, 1, -1) - . = ..() - -/datum/emote/living/fart - key = "fart" - key_third_person = "farts" - message = "farts" - emote_type = EMOTE_AUDIBLE - - - //god hates me for this -Metha - -/datum/emote/living/fart/run_emote(mob/living/user, params) - if(!ishuman(user)) - return FALSE - - var/fartSoundChoice = rand(3) - switch(fartSoundChoice) - if (0) - playsound(user, 'GainStation13/sound/voice/fart3.ogg', 50, 1, -1) - if (1) - playsound(user, 'GainStation13/sound/voice/fart4.ogg', 50, 1, -1) - if (2) - playsound(user, 'GainStation13/sound/voice/fart2.ogg', 50, 1, -1) - if (3) - playsound(user, 'GainStation13/sound/voice/fart1.ogg', 50, 1, -1) - - . = ..() - //Shhh... It's a secret! Don't tell or I'll steal your legs /datum/emote/living/burunyu key = "burunyu" @@ -56,35 +91,9 @@ emote_type = EMOTE_AUDIBLE /datum/emote/living/burunyu/run_emote(mob/living/user, params) - playsound(user, 'GainStation13/sound/voice/funnycat.ogg', 50, 1, -1) - . = ..() - - -/datum/emote/living/belch - key = "belch" - key_third_person = "belches loudly" - message = "belches" - emote_type = EMOTE_AUDIBLE - - //god hates me for this -Metha - -/datum/emote/living/belch/run_emote(mob/living/user, params) if(!ishuman(user)) - return FALSE - - var/fartSoundChoice = rand(5) - switch(fartSoundChoice) - if(0) - playsound(user, 'GainStation13/sound/voice/belch3.ogg', 50, 1, -1) - if(1) - playsound(user, 'GainStation13/sound/voice/belch4.ogg', 50, 1, -1) - if(2) - playsound(user, 'GainStation13/sound/voice/belch2.ogg', 50, 1, -1) - if(3) - playsound(user, 'GainStation13/sound/voice/belch1.ogg', 50, 1, -1) - if(4) - playsound(user, 'GainStation13/sound/voice/belch5.ogg', 50, 1, -1) - if(5) - playsound(user, 'GainStation13/sound/voice/belch6.ogg', 50, 1, -1) + return FALSE - . = ..() + make_noise(user, "burunyu", 0) + + . = ..() diff --git a/code/game/sound.dm b/code/game/sound.dm index 2e7d7552..11e02610 100644 --- a/code/game/sound.dm +++ b/code/game/sound.dm @@ -227,13 +227,4 @@ if("slosh") soundin = pick('sound/effects/slosh1.ogg', 'sound/effects/slosh2.ogg') //END OF CIT CHANGES - if("fart") //GS13 - soundin = pick( 'GainStation13/sound/voice/brap1.ogg', - 'GainStation13/sound/voice/brap2.ogg', - 'GainStation13/sound/voice/brap3.ogg', - 'GainStation13/sound/voice/brap4.ogg', - 'GainStation13/sound/voice/brap5.ogg', - 'GainStation13/sound/voice/brap6.ogg', - 'GainStation13/sound/voice/brap7.ogg', - 'GainStation13/sound/voice/brap8.ogg') return soundin diff --git a/code/modules/mob/living/emote.dm b/code/modules/mob/living/emote.dm index 01aedf2b..68464e5a 100644 --- a/code/modules/mob/living/emote.dm +++ b/code/modules/mob/living/emote.dm @@ -16,18 +16,6 @@ message_param = "bows to %t." restraint_check = TRUE -/datum/emote/living/burp - key = "burp" - key_third_person = "burps" - message = "burps." - emote_type = EMOTE_AUDIBLE - -/datum/emote/living/belch - key = "belch" - key_third_person = "belches loudly" - message = "belches." - emote_type = EMOTE_AUDIBLE - /datum/emote/living/choke key = "choke" key_third_person = "chokes" diff --git a/tgstation.dme b/tgstation.dme index d3e36a12..aba0aa0d 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -3073,6 +3073,7 @@ #include "code\modules\zombie\items.dm" #include "code\modules\zombie\organs.dm" #include "GainStation13\code\clothing\calorite_collar.dm" +#include "GainStation13\code\game\sound.dm" #include "GainStation13\code\game\area\ruins.dm" #include "GainStation13\code\machinery\feeding_tube.dm" #include "GainStation13\code\mechanics\fatness.dm" @@ -3082,7 +3083,6 @@ #include "GainStation13\code\mobs\cakegolem.dm" #include "GainStation13\code\modules\client\preferences\preferences.dm" #include "GainStation13\code\modules\food_and_drinks\drinks\drinks.dm" -#include "GainStation13\code\modules\mob\living\brap.dm" #include "GainStation13\code\modules\mob\living\emote.dm" #include "GainStation13\code\modules\reagents\chemistry\reagents\consumable_reagents.dm" #include "GainStation13\code\modules\reagents\chemistry\reagents\dwarverndrinks.dm"