Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Tom <[email protected]>
Signed-off-by: CliffracerX <[email protected]>
  • Loading branch information
CliffracerX and tf-4 authored Oct 19, 2024
1 parent c433dfb commit ee31e90
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion modular_doppler/_HELPERS/preferences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ GLOBAL_LIST_INIT(dopplerboop_voice_types, sort_list(list(
"jock",
"lazy",
"smug",
"mute"
"mute",
)))
2 changes: 1 addition & 1 deletion modular_doppler/dopplerboop/dopplerboops.dm
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,6 @@
if(!volume || (last_dopplerboop != initial_dopplerboop_time) || !final_boop)
return
for(var/mob/hearer as anything in hearers)
var/user_volume = hearer.client.prefs.read_preference(/datum/preference/numeric/voice_volume)
var/user_volume = hearer.client?.prefs.read_preference(/datum/preference/numeric/voice_volume)
volume = volume*(user_volume / 10)
hearer.playsound_local(turf_source = get_turf(dopplerbooper), sound_to_use = final_boop, vol = volume, vary = TRUE, frequency = freq, falloff_distance = falloff_exponent, max_distance = 16)
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
var/boop_letter = null
var/dopplerboop_delay_cumulative = 0
var/sound/final_boop = null
var/user_volume = user.client.prefs.read_preference(/datum/preference/numeric/voice_volume)
var/user_volume = user.client?.prefs.read_preference(/datum/preference/numeric/voice_volume)

for(var/i in 1 to min(length(all_boops), MAX_DOPPLERBOOP_CHARACTERS))
var/volume = DOPPLERBOOP_DEFAULT_VOLUME
Expand Down

0 comments on commit ee31e90

Please sign in to comment.