Files
87458d1109 [MIRROR] Makes TTS blips/enabled into one pref [MDB IGNORE] (#22633)
* Makes TTS blips/enabled into one pref (#76558)

## About The Pull Request

![image](https://github.com/tgstation/tgstation/assets/53777086/6b06c212-060e-415f-b1fd-a6ac9f651627)

I actually do not know how to test this locally as I don't know how to
set TTS up, hope it works.

## Why It's Good For The Game

It's 2 buttons, one only works depending on the other, I don't think it
makes sense.

## Changelog

🆑
qol: The TTS and TTS Blips option is now one choiced preference.
/🆑

* Makes TTS blips/enabled into one pref

---------

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
2023-07-24 16:36:44 -04:00

13 lines
604 B
Plaintext

/// Previously, tts enabled/blip were individual buttons
/// PR #76558 changed them to one dropdown choice.
/// This migration transfers the player's existing preferences into the new dropdown
/datum/preferences/proc/update_tts_blip_prefs()
var/sound_blips_enabled = savefile.get_entry("sound_tts_blips")
if(sound_blips_enabled)
write_preference(GLOB.preference_entries[/datum/preference/choiced/sound_tts], TTS_SOUND_BLIPS)
return
var/tts_enabled = savefile.get_entry("sound_tts")
if(!tts_enabled)
write_preference(GLOB.preference_entries[/datum/preference/choiced/sound_tts], TTS_SOUND_OFF)