From e4c7935e6400a4f6c04734385d05576163f65025 Mon Sep 17 00:00:00 2001 From: psq95 Date: Sun, 16 Apr 2023 17:24:46 +0100 Subject: [PATCH 1/2] Consolidate GS13 noises Remove brap noises from tgstation get_sfx Create sound file for gs13 get_sfx Create function for GS13 emotes with preference toggle --- GainStation13/code/game/sound.dm | 32 ++++ GainStation13/code/modules/mob/living/brap.dm | 20 --- .../code/modules/mob/living/emote.dm | 143 ++++++++++-------- code/game/sound.dm | 9 -- code/modules/mob/living/emote.dm | 12 -- tgstation.dme | 2 +- 6 files changed, 109 insertions(+), 109 deletions(-) create mode 100644 GainStation13/code/game/sound.dm delete mode 100644 GainStation13/code/modules/mob/living/brap.dm 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" From 03a8a7e2325321085241833c30a36ec306624b16 Mon Sep 17 00:00:00 2001 From: psq95 Date: Sun, 16 Apr 2023 17:54:30 +0100 Subject: [PATCH 2/2] Add toggle for burping noises Move burping and farting toggles to GS13 Preferences section --- GainStation13/code/modules/mob/living/emote.dm | 4 ++-- code/__DEFINES/citadel_defines.dm | 10 ++++++---- code/__DEFINES/sound.dm | 5 +++-- code/modules/client/preferences.dm | 10 +++++++--- modular_citadel/code/modules/client/preferences.dm | 5 ++++- .../code/modules/client/preferences_toggles.dm | 13 ++++++++++++- 6 files changed, 34 insertions(+), 13 deletions(-) diff --git a/GainStation13/code/modules/mob/living/emote.dm b/GainStation13/code/modules/mob/living/emote.dm index 551d0b2a..f95c92c0 100644 --- a/GainStation13/code/modules/mob/living/emote.dm +++ b/GainStation13/code/modules/mob/living/emote.dm @@ -19,7 +19,7 @@ if(!ishuman(user)) return FALSE - make_noise(user, "belch", 0) + make_noise(user, "belch", BURPING_NOISES) . = ..() @@ -50,7 +50,7 @@ if(!ishuman(user)) return FALSE - make_noise(user, "burp", 0) + make_noise(user, "burp", BURPING_NOISES) . = ..() diff --git a/code/__DEFINES/citadel_defines.dm b/code/__DEFINES/citadel_defines.dm index a1d95966..aa0efeb6 100644 --- a/code/__DEFINES/citadel_defines.dm +++ b/code/__DEFINES/citadel_defines.dm @@ -129,13 +129,15 @@ //Citadel toggles because bitflag memes #define MEDIHOUND_SLEEPER (1<<0) -#define EATING_NOISES (1<<1) -#define DIGESTION_NOISES (1<<2) -#define TRASH_FORCEFEED (1<<3) +#define EATING_NOISES (1<<1) //Vore +#define DIGESTION_NOISES (1<<2) //Vore + +#define TRASH_FORCEFEED (1<<3) //GS13 #define FARTING_NOISES (1<<4) //GS13 +#define BURPING_NOISES (1<<5) //GS13 //toggles on by default -#define TOGGLES_CITADEL (EATING_NOISES|DIGESTION_NOISES|FARTING_NOISES) +#define TOGGLES_CITADEL (EATING_NOISES|DIGESTION_NOISES|FARTING_NOISES|BURPING_NOISES) //component stuff #define COMSIG_COMBAT_TOGGLED "combatmode_toggled" //called by combat mode toggle on all equipped items. args: (mob/user, combatmode) diff --git a/code/__DEFINES/sound.dm b/code/__DEFINES/sound.dm index 0f702350..bd54ef58 100644 --- a/code/__DEFINES/sound.dm +++ b/code/__DEFINES/sound.dm @@ -19,11 +19,12 @@ #define CHANNEL_REACTOR_ALERT 1007 // reactor sounds //GS13 Channels -#define CHANNEL_BRAP 1006 +#define CHANNEL_BURP 1006 +#define CHANNEL_FART 1005 //THIS SHOULD ALWAYS BE THE LOWEST ONE! //KEEP IT UPDATED -#define CHANNEL_HIGHEST_AVAILABLE 1005 +#define CHANNEL_HIGHEST_AVAILABLE 1004 #define SOUND_MINIMUM_PRESSURE 10 #define FALLOFF_SOUNDS 1 diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 9a3e240a..c0e71527 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -1021,16 +1021,18 @@ GLOBAL_LIST_EMPTY(preferences_datums) dat += "Exhibitionist:[features["exhibitionist"] == TRUE ? "Yes" : "No"]
" dat += "Hear Vore Sounds: [(cit_toggles & EATING_NOISES) ? "Yes" : "No"]
" dat += "Hear Vore Digestion Sounds: [(cit_toggles & DIGESTION_NOISES) ? "Yes" : "No"]
" - dat += "Hear Fart Sounds: [(cit_toggles & FARTING_NOISES) ? "Yes" : "No"]
" - dat += "Allow trash forcefeeding (requires Trashcan quirk) [(cit_toggles & TRASH_FORCEFEED) ? "Yes" : "No"]
" dat += "Lewdchem:[lewdchem == TRUE ? "Enabled" : "Disabled"]
" dat += "Widescreen: [widescreenpref ? "Enabled ([CONFIG_GET(string/default_view)])" : "Disabled (15x15)"]
" dat += "Auto stand: [autostand ? "Enabled" : "Disabled"]
" dat += "Screen Shake: [(screenshake==100) ? "Full" : ((screenshake==0) ? "None" : "[screenshake]")]
" if (user && user.client && !user.client.prefs.screenshake==0) dat += "Damage Screen Shake: [(damagescreenshake==1) ? "On" : ((damagescreenshake==0) ? "Off" : "Only when down")]
" - //GS13 stuff goes here + + //GS13 dat += "

GS13 Preferences

" + dat += "Hear Burp Sounds: [(cit_toggles & BURPING_NOISES) ? "Yes" : "No"]
" + dat += "Hear Fart Sounds: [(cit_toggles & FARTING_NOISES) ? "Yes" : "No"]
" + dat += "Trashcan Forcefeeding: [(cit_toggles & TRASH_FORCEFEED) ? "Yes" : "No"]
" dat += "Maximum Weight:[max_weight == FALSE ? "None" : max_weight]
" dat += "NonCon - Weight Gain:[noncon_weight_gain == TRUE ? "Enabled" : "Disabled"]
" @@ -2804,6 +2806,8 @@ GLOBAL_LIST_EMPTY(preferences_datums) cit_toggles ^= DIGESTION_NOISES if("toggleforcefeedtrash") //GS13 cit_toggles ^= TRASH_FORCEFEED + if("toggleburpingnoise") //GS13 + cit_toggles ^= BURPING_NOISES if("togglefartingnoise") //GS13 cit_toggles ^= FARTING_NOISES //END CITADEL EDIT diff --git a/modular_citadel/code/modules/client/preferences.dm b/modular_citadel/code/modules/client/preferences.dm index d56958c9..6b8c846b 100644 --- a/modular_citadel/code/modules/client/preferences.dm +++ b/modular_citadel/code/modules/client/preferences.dm @@ -19,10 +19,13 @@ var/lewdchem = TRUE //vore prefs + var/hound_sleeper = TRUE var/toggleeatingnoise = TRUE var/toggledigestionnoise = TRUE + //GS13 + var/toggleburpingnoise = TRUE var/togglefartingnoise = TRUE - var/hound_sleeper = TRUE + //default toggles var/cit_toggles = TOGGLES_CITADEL //Hyper prefs diff --git a/modular_citadel/code/modules/client/preferences_toggles.dm b/modular_citadel/code/modules/client/preferences_toggles.dm index 84049e05..9d91c09c 100644 --- a/modular_citadel/code/modules/client/preferences_toggles.dm +++ b/modular_citadel/code/modules/client/preferences_toggles.dm @@ -20,13 +20,24 @@ TOGGLE_CHECKBOX(/datum/verbs/menu/Settings/Sound, toggledigestionnoise)() /datum/verbs/menu/Settings/Sound/toggledigestionnoise/Get_checked(client/C) return C.prefs.cit_toggles & DIGESTION_NOISES +TOGGLE_CHECKBOX(/datum/verbs/menu/Settings/Sound, toggleburpingnoise)() + set name = "Toggle Burping Noises" + set category = "Preferences" + set desc = "Hear Burping noises" + usr.client.prefs.cit_toggles ^= BURPING_NOISES + usr.client.prefs.save_preferences() + usr.stop_sound_channel(CHANNEL_BURP) + to_chat(usr, "You will [(usr.client.prefs.cit_toggles & BURPING_NOISES) ? "now" : "no longer"] hear burping noises.") +/datum/verbs/menu/Settings/Sound/toggleburpingnoise/Get_checked(client/C) + return C.prefs.cit_toggles & BURPING_NOISES + TOGGLE_CHECKBOX(/datum/verbs/menu/Settings/Sound, togglefartingnoise)() set name = "Toggle Farting Noises" set category = "Preferences" set desc = "Hear Farting noises" usr.client.prefs.cit_toggles ^= FARTING_NOISES usr.client.prefs.save_preferences() - usr.stop_sound_channel(CHANNEL_BRAP) + usr.stop_sound_channel(CHANNEL_FART) to_chat(usr, "You will [(usr.client.prefs.cit_toggles & FARTING_NOISES) ? "now" : "no longer"] hear farting noises.") /datum/verbs/menu/Settings/Sound/togglefartingnoise/Get_checked(client/C) return C.prefs.cit_toggles & FARTING_NOISES