@@ -1,7 +1,7 @@
|
||||
/proc/playsound_prefed(atom/source, soundin, pref, vol as num, vary, extrarange as num, falloff, frequency = null, channel = 0, pressure_affected = TRUE, ignore_walls = TRUE, soundenvwet = -10000, soundenvdry = 0)
|
||||
/proc/playsound_prefed(atom/source, soundin, pref, vol as num, vary, extrarange as num, falloff_exponent = SOUND_FALLOFF_EXPONENT, frequency = null, channel = 0, pressure_affected = TRUE, ignore_walls = TRUE,
|
||||
falloff_distance = SOUND_DEFAULT_FALLOFF_DISTANCE, envwet = -10000, envdry = 0, distance_multiplier = SOUND_DEFAULT_DISTANCE_MULTIPLIER, distance_multiplier_min_range = SOUND_DEFAULT_MULTIPLIER_EFFECT_RANGE)
|
||||
if(isarea(source))
|
||||
throw EXCEPTION("playsound(): source is an area")
|
||||
return
|
||||
CRASH("playsound(): source is an area")
|
||||
|
||||
var/turf/turf_source = get_turf(source)
|
||||
|
||||
@@ -9,29 +9,42 @@
|
||||
return
|
||||
|
||||
//allocate a channel if necessary now so its the same for everyone
|
||||
channel = channel //|| open_sound_channel()
|
||||
channel = channel || SSsounds.random_available_channel()
|
||||
|
||||
// Looping through the player list has the added bonus of working for mobs inside containers
|
||||
// Looping through the player list has the added bonus of working for mobs inside containers
|
||||
var/sound/S = sound(get_sfx(soundin))
|
||||
var/maxdistance = (world.view + extrarange)
|
||||
var/z = turf_source.z
|
||||
var/list/listeners = SSmobs.clients_by_zlevel[z]
|
||||
var/maxdistance = SOUND_RANGE + extrarange
|
||||
var/source_z = turf_source.z
|
||||
var/list/listeners = SSmobs.clients_by_zlevel[source_z].Copy()
|
||||
|
||||
var/turf/above_turf = SSmapping.get_turf_above(turf_source)
|
||||
var/turf/below_turf = SSmapping.get_turf_below(turf_source)
|
||||
|
||||
if(!ignore_walls) //these sounds don't carry through walls
|
||||
listeners = listeners & hearers(maxdistance,turf_source)
|
||||
|
||||
if(above_turf && istransparentturf(above_turf))
|
||||
listeners += hearers(maxdistance,above_turf)
|
||||
|
||||
if(below_turf && istransparentturf(turf_source))
|
||||
listeners += hearers(maxdistance,below_turf)
|
||||
|
||||
else
|
||||
if(above_turf && istransparentturf(above_turf))
|
||||
listeners += SSmobs.clients_by_zlevel[above_turf.z]
|
||||
|
||||
if(below_turf && istransparentturf(turf_source))
|
||||
listeners += SSmobs.clients_by_zlevel[below_turf.z]
|
||||
|
||||
for(var/P in listeners)
|
||||
var/mob/M = P
|
||||
if(!M.client)
|
||||
continue
|
||||
if(!(M.client?.prefs.cit_toggles & pref))
|
||||
continue
|
||||
if(get_dist(M, turf_source) <= maxdistance)
|
||||
M.playsound_local(turf_source, soundin, vol, vary, frequency, falloff, channel, pressure_affected, S, soundenvwet, soundenvdry)
|
||||
for(var/P in SSmobs.dead_players_by_zlevel[z])
|
||||
M.playsound_local(turf_source, soundin, vol, vary, frequency, falloff_exponent, channel, pressure_affected, S, maxdistance, falloff_distance, get_dist(M, turf_source) <= distance_multiplier_min_range? 1 : distance_multiplier, envwet, envdry)
|
||||
for(var/P in SSmobs.dead_players_by_zlevel[source_z])
|
||||
var/mob/M = P
|
||||
if(!M.client)
|
||||
continue
|
||||
if(!(M.client?.prefs.cit_toggles & pref))
|
||||
continue
|
||||
if(get_dist(M, turf_source) <= maxdistance)
|
||||
M.playsound_local(turf_source, soundin, vol, vary, frequency, falloff, channel, pressure_affected, S, soundenvwet, soundenvdry)
|
||||
M.playsound_local(turf_source, soundin, vol, vary, frequency, falloff_exponent, channel, pressure_affected, S, maxdistance, falloff_distance, get_dist(M, turf_source) <= distance_multiplier_min_range? 1 : distance_multiplier, envwet, envdry)
|
||||
|
||||
@@ -147,5 +147,5 @@
|
||||
#define OLD_CHARACTER_COLORING "old_color_system"
|
||||
#define ADVANCED_CHARACTER_COLORING "advanced_color_system"
|
||||
|
||||
#define FARTING_NOISES (1<<4) //GS13
|
||||
#define BURPING_NOISES (1<<5) //GS13
|
||||
#define FARTING_NOISES (1<<17) //GS13
|
||||
#define BURPING_NOISES (1<<18) //GS13
|
||||
|
||||
@@ -340,4 +340,28 @@ distance_multiplier - Can be used to multiply the distance at which the sound is
|
||||
if("smdelam")
|
||||
soundin = pick('sound/machines/sm/accent/delam/1.ogg', 'sound/machines/sm/accent/normal/2.ogg', 'sound/machines/sm/accent/normal/3.ogg', 'sound/machines/sm/accent/normal/4.ogg', 'sound/machines/sm/accent/normal/5.ogg', 'sound/machines/sm/accent/normal/6.ogg', 'sound/machines/sm/accent/normal/7.ogg', 'sound/machines/sm/accent/normal/8.ogg', 'sound/machines/sm/accent/normal/9.ogg', 'sound/machines/sm/accent/normal/10.ogg', 'sound/machines/sm/accent/normal/11.ogg', 'sound/machines/sm/accent/normal/12.ogg', 'sound/machines/sm/accent/normal/13.ogg', 'sound/machines/sm/accent/normal/14.ogg', 'sound/machines/sm/accent/normal/15.ogg', 'sound/machines/sm/accent/normal/16.ogg', 'sound/machines/sm/accent/normal/17.ogg', 'sound/machines/sm/accent/normal/18.ogg', 'sound/machines/sm/accent/normal/19.ogg', 'sound/machines/sm/accent/normal/20.ogg', 'sound/machines/sm/accent/normal/21.ogg', 'sound/machines/sm/accent/normal/22.ogg', 'sound/machines/sm/accent/normal/23.ogg', 'sound/machines/sm/accent/normal/24.ogg', 'sound/machines/sm/accent/normal/25.ogg', 'sound/machines/sm/accent/normal/26.ogg', 'sound/machines/sm/accent/normal/27.ogg', 'sound/machines/sm/accent/normal/28.ogg', 'sound/machines/sm/accent/normal/29.ogg', 'sound/machines/sm/accent/normal/30.ogg', 'sound/machines/sm/accent/normal/31.ogg', 'sound/machines/sm/accent/normal/32.ogg', 'sound/machines/sm/accent/normal/33.ogg')
|
||||
//END OF CIT CHANGES
|
||||
// GS13 Start - Gainstation sounds
|
||||
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',
|
||||
'GainStation13/sound/voice/belch7.ogg', 'GainStation13/sound/voice/belch8.ogg',
|
||||
'GainStation13/sound/voice/belch9.ogg', 'GainStation13/sound/voice/belch10.ogg',
|
||||
'GainStation13/sound/voice/belch11.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',
|
||||
'GainStation13/sound/voice/gurgle3.ogg')
|
||||
// GS13 end
|
||||
return soundin
|
||||
|
||||
@@ -1405,6 +1405,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
dat += "<b>Show that you want to be confronted:</b><a href='?_src_=prefs;preference=trouble_seeker'>[trouble_seeker == TRUE ? "Enabled" : "Disabled"]</a><BR>"
|
||||
dat += "<b>Bot Feeding:</b><a href='?_src_=prefs;preference=bot_feeding'>[bot_feeding == TRUE ? "Enabled" : "Disabled"]</a><BR>"
|
||||
dat += "<b>Blueberry Inflation:</b><a href='?_src_=prefs;preference=blueberry_inflation'>[blueberry_inflation == TRUE ? "Enabled" : "Disabled"]</a><BR>"
|
||||
dat += "<b>Hear Burping Noises:</b> <a href='?_src_=prefs;preference=burping_noises'>[(cit_toggles & BURPING_NOISES) ? "Allowed" : "Disallowed"]</a><br>"
|
||||
dat += "<b>Hear Farting Noises:</b> <a href='?_src_=prefs;preference=farting_noises'>[(cit_toggles & FARTING_NOISES) ? "Allowed" : "Disallowed"]</a><br>"
|
||||
|
||||
dat += "<h2>Weight Gain Types</h2>"
|
||||
dat += "<b>Food:</b><a href='?_src_=prefs;preference=weight_gain_food'>[weight_gain_food == TRUE ? "Enabled" : "Disabled"]</a><BR>"
|
||||
@@ -3505,6 +3507,11 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
|
||||
if("blueberry_inflation")
|
||||
blueberry_inflation = !blueberry_inflation
|
||||
if("burping_noises")
|
||||
cit_toggles ^= BURPING_NOISES
|
||||
if("farting_noises")
|
||||
cit_toggles ^= FARTING_NOISES
|
||||
|
||||
if("max_fatness")
|
||||
max_weight = chose_weight("Choose your max fatness level, your weight will not go beyond this. None will let you gain without a limit", user)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user