mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 05:30:05 +01:00
Re-Adds the radio noise volume slider (#96602)
## About The Pull Request As the title said, re-adds the radio noise volume slider in the preferences menu. <details> <summary>Images</summary> Before: <img width="920" height="770" alt="image" src="https://github.com/user-attachments/assets/d182f6ed-7968-4fa7-a4df-73d1125e9c32" /> After: <img width="920" height="770" alt="image" src="https://github.com/user-attachments/assets/3e414130-ca04-4f76-8dbb-608bca1b84f4" /> </details> ## Why It's Good For The Game People should be able to adjust the volume of radio beeps, since it can be overwhelmingly loud when radio is really going off. ## Changelog 🆑 fix: Fixed the radio volume slider being missing in game preferences /🆑 --------- Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
This commit is contained in:
@@ -497,7 +497,6 @@
|
||||
data["subspace"] = subspace_transmission
|
||||
data["subspaceSwitchable"] = subspace_switchable
|
||||
data["headset"] = FALSE
|
||||
data["radio_noises"] = (user.client?.prefs.read_preference(/datum/preference/numeric/volume/sound_radio_noise))
|
||||
|
||||
return data
|
||||
|
||||
@@ -506,7 +505,6 @@
|
||||
if(.)
|
||||
return
|
||||
|
||||
var/mob/user = ui.user
|
||||
switch(action)
|
||||
if("frequency")
|
||||
if(freqlock != RADIO_FREQENCY_UNLOCKED)
|
||||
@@ -557,15 +555,6 @@
|
||||
else
|
||||
recalculateChannels()
|
||||
. = TRUE
|
||||
if("set_radio_volume")
|
||||
if(!user.client)
|
||||
return
|
||||
user.client.prefs.write_preference(GLOB.preference_entries[/datum/preference/numeric/volume/sound_radio_noise], params["volume"])
|
||||
//let them know what it'll sound like
|
||||
//we get their read prefs instead of just taking the params beacuse write_preference is what handles ensuring
|
||||
//there's no href exploits.
|
||||
var/volume_modifier = (user.client.prefs.read_preference(/datum/preference/numeric/volume/sound_radio_noise))
|
||||
SEND_SOUND(user, sound('sound/items/radio/radio_receive.ogg', volume = volume_modifier))
|
||||
|
||||
/obj/item/radio/examine(mob/user)
|
||||
. = ..()
|
||||
|
||||
Reference in New Issue
Block a user