mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 11:05:03 +01:00
More fixes to text2speech
This commit is contained in:
@@ -95,7 +95,7 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
|
||||
if((R_ADMIN|R_MOD) & X.holder.rights)
|
||||
if(X.is_afk())
|
||||
admin_number_afk++
|
||||
if(X.prefs.toggles & SOUND_ADMINHELP)
|
||||
if(X.prefs.sound & SOUND_ADMINHELP)
|
||||
X << 'sound/effects/adminhelp.ogg'
|
||||
X << msg
|
||||
|
||||
|
||||
@@ -119,7 +119,7 @@
|
||||
|
||||
//play the recieving admin the adminhelp sound (if they have them enabled)
|
||||
//non-admins shouldn't be able to disable this
|
||||
if(C.prefs.toggles & SOUND_ADMINHELP)
|
||||
if(C.prefs.sound & SOUND_ADMINHELP)
|
||||
C << 'sound/effects/adminhelp.ogg'
|
||||
|
||||
/*
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
log_admin("[key_name(src)] played sound [S]")
|
||||
message_admins("[key_name_admin(src)] played sound [S]", 1)
|
||||
for(var/mob/M in player_list)
|
||||
if(M.client.prefs.toggles & SOUND_MIDI)
|
||||
if(M.client.prefs.sound & SOUND_MIDI)
|
||||
M << uploaded_sound
|
||||
|
||||
feedback_add_details("admin_verb","PGS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -45,6 +45,7 @@ datum/preferences
|
||||
var/be_special = 0 //Special role selection
|
||||
var/UI_style = "Midnight"
|
||||
var/toggles = TOGGLES_DEFAULT
|
||||
var/sound = SOUND_DEFAULT
|
||||
var/UI_style_color = "#ffffff"
|
||||
var/UI_style_alpha = 255
|
||||
|
||||
@@ -303,13 +304,14 @@ datum/preferences
|
||||
dat += "<b>Custom UI</b>(recommended for White UI):<br>"
|
||||
dat += "-Color: <a href='?_src_=prefs;preference=UIcolor'><b>[UI_style_color]</b></a> <table style='display:inline;' bgcolor='[UI_style_color]'><tr><td>__</td></tr></table><br>"
|
||||
dat += "-Alpha(transparence): <a href='?_src_=prefs;preference=UIalpha'><b>[UI_style_alpha]</b></a><br>"
|
||||
dat += "<b>Play admin midis:</b> <a href='?_src_=prefs;preference=hear_midis'><b>[(toggles & SOUND_MIDI) ? "Yes" : "No"]</b></a><br>"
|
||||
dat += "<b>Play lobby music:</b> <a href='?_src_=prefs;preference=lobby_music'><b>[(toggles & SOUND_LOBBY) ? "Yes" : "No"]</b></a><br>"
|
||||
dat += "<b>Play admin midis:</b> <a href='?_src_=prefs;preference=hear_midis'><b>[(sound & SOUND_MIDI) ? "Yes" : "No"]</b></a><br>"
|
||||
dat += "<b>Play lobby music:</b> <a href='?_src_=prefs;preference=lobby_music'><b>[(sound & SOUND_LOBBY) ? "Yes" : "No"]</b></a><br>"
|
||||
dat += "<b>Hear player voices:</b> <a href='?_src_=prefs;preference=player_voices'><b>[(sound & SOUND_VOICES) ? "Yes" : "No"]</b></a><br>"
|
||||
dat += "<b>Randomized Character Slot:</b> <a href='?_src_=prefs;preference=randomslot'><b>[randomslot ? "Yes" : "No"]</b></a><br>"
|
||||
dat += "<b>Ghost ears:</b> <a href='?_src_=prefs;preference=ghost_ears'><b>[(toggles & CHAT_GHOSTEARS) ? "Nearest Creatures" : "All Speech"]</b></a><br>"
|
||||
dat += "<b>Ghost sight:</b> <a href='?_src_=prefs;preference=ghost_sight'><b>[(toggles & CHAT_GHOSTSIGHT) ? "Nearest Creatures" : "All Emotes"]</b></a><br>"
|
||||
dat += "<b>Ghost radio:</b> <a href='?_src_=prefs;preference=ghost_radio'><b>[(toggles & CHAT_GHOSTRADIO) ? "Nearest Speakers" : "All Chatter"]</b></a><br>"
|
||||
dat += "<b>Hear player voices:</b> <a href='?_src_=prefs;preference=player_voices'><b>[(toggles & SOUND_VOICES) ? "Yes" : "No"]</b></a><br>"
|
||||
|
||||
|
||||
if(config.allow_Metadata)
|
||||
dat += "<b>OOC Notes:</b> <a href='?_src_=prefs;preference=metadata;task=input'> Edit </a><br>"
|
||||
@@ -1244,7 +1246,7 @@ datum/preferences
|
||||
|
||||
|
||||
if("hear_adminhelps")
|
||||
toggles ^= SOUND_ADMINHELP
|
||||
sound ^= SOUND_ADMINHELP
|
||||
|
||||
if("ui")
|
||||
switch(UI_style)
|
||||
@@ -1274,11 +1276,11 @@ datum/preferences
|
||||
randomslot = !randomslot
|
||||
|
||||
if("hear_midis")
|
||||
toggles ^= SOUND_MIDI
|
||||
sound ^= SOUND_MIDI
|
||||
|
||||
if("lobby_music")
|
||||
toggles ^= SOUND_LOBBY
|
||||
if(toggles & SOUND_LOBBY)
|
||||
sound ^= SOUND_LOBBY
|
||||
if(sound & SOUND_LOBBY)
|
||||
user << sound(ticker.login_music, repeat = 0, wait = 0, volume = 85, channel = 1)
|
||||
else
|
||||
user << sound(null, repeat = 0, wait = 0, volume = 85, channel = 1)
|
||||
@@ -1293,7 +1295,7 @@ datum/preferences
|
||||
toggles ^= CHAT_GHOSTRADIO
|
||||
|
||||
if("player_voices")
|
||||
toggles ^= SOUND_VOICES
|
||||
sound ^= SOUND_VOICES
|
||||
|
||||
if("save")
|
||||
save_preferences()
|
||||
|
||||
@@ -54,6 +54,7 @@
|
||||
S["be_special"] >> be_special
|
||||
S["default_slot"] >> default_slot
|
||||
S["toggles"] >> toggles
|
||||
S["sound"] >> sound
|
||||
S["UI_style_color"] >> UI_style_color
|
||||
S["UI_style_alpha"] >> UI_style_alpha
|
||||
S["randomslot"] >> randomslot
|
||||
@@ -65,6 +66,7 @@
|
||||
be_special = sanitize_integer(be_special, 0, 65535, initial(be_special))
|
||||
default_slot = sanitize_integer(default_slot, 1, MAX_SAVE_SLOTS, initial(default_slot))
|
||||
toggles = sanitize_integer(toggles, 0, 65535, initial(toggles))
|
||||
sound = sanitize_integer(sound, 0, 65535, initial(toggles))
|
||||
UI_style_color = sanitize_hexcolor(UI_style_color, initial(UI_style_color))
|
||||
UI_style_alpha = sanitize_integer(UI_style_alpha, 0, 255, initial(UI_style_alpha))
|
||||
randomslot = sanitize_integer(randomslot, 0, 1, initial(randomslot))
|
||||
@@ -85,6 +87,7 @@
|
||||
S["be_special"] << be_special
|
||||
S["default_slot"] << default_slot
|
||||
S["toggles"] << toggles
|
||||
S["sound"] << sound
|
||||
S["UI_style_color"] << UI_style_color
|
||||
S["UI_style_alpha"] << UI_style_alpha
|
||||
S["randomslot"] << randomslot
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
set category = "Preferences"
|
||||
set desc = "Toggle hearing a notification when admin PMs are recieved"
|
||||
if(!holder) return
|
||||
prefs.toggles ^= SOUND_ADMINHELP
|
||||
prefs.sound ^= SOUND_ADMINHELP
|
||||
prefs.save_preferences()
|
||||
usr << "You will [(prefs.toggles & SOUND_ADMINHELP) ? "now" : "no longer"] hear a sound when adminhelps arrive."
|
||||
feedback_add_details("admin_verb","AHS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
@@ -73,9 +73,9 @@
|
||||
set name = "Hear/Silence LobbyMusic"
|
||||
set category = "Preferences"
|
||||
set desc = "Toggles hearing the GameLobby music"
|
||||
prefs.toggles ^= SOUND_LOBBY
|
||||
prefs.sound ^= SOUND_LOBBY
|
||||
prefs.save_preferences()
|
||||
if(prefs.toggles & SOUND_LOBBY)
|
||||
if(prefs.sound & SOUND_LOBBY)
|
||||
src << "You will now hear music in the game lobby."
|
||||
if(istype(mob, /mob/new_player))
|
||||
playtitlemusic()
|
||||
@@ -89,18 +89,18 @@
|
||||
set name = "Toggle player voices"
|
||||
set category = "Preferences"
|
||||
set desc = "Toggle hearing player voice sounds"
|
||||
prefs.toggles ^= SOUND_VOICES
|
||||
prefs.sound ^= SOUND_VOICES
|
||||
prefs.save_preferences()
|
||||
src << "You will [(prefs.toggles & SOUND_VOICES) ? "now" : "no longer"] hear voices of players around you, or your own voice."
|
||||
src << "You will [(prefs.sound & SOUND_VOICES) ? "now" : "no longer"] hear voices of players around you, or your own voice."
|
||||
feedback_add_details("admin_verb","TVoice") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/verb/togglemidis()
|
||||
set name = "Hear/Silence Midis"
|
||||
set category = "Preferences"
|
||||
set desc = "Toggles hearing sounds uploaded by admins"
|
||||
prefs.toggles ^= SOUND_MIDI
|
||||
prefs.sound ^= SOUND_MIDI
|
||||
prefs.save_preferences()
|
||||
if(prefs.toggles & SOUND_MIDI)
|
||||
if(prefs.sound & SOUND_MIDI)
|
||||
src << "You will now hear any sounds uploaded by admins."
|
||||
else
|
||||
var/sound/break_sound = sound(null, repeat = 0, wait = 0, channel = 777)
|
||||
@@ -133,9 +133,9 @@
|
||||
set name = "Hear/Silence Ambience"
|
||||
set category = "Preferences"
|
||||
set desc = "Toggles hearing ambient sound effects"
|
||||
prefs.toggles ^= SOUND_AMBIENCE
|
||||
prefs.sound ^= SOUND_AMBIENCE
|
||||
prefs.save_preferences()
|
||||
if(prefs.toggles & SOUND_AMBIENCE)
|
||||
if(prefs.sound & SOUND_AMBIENCE)
|
||||
src << "You will now hear ambient sounds."
|
||||
else
|
||||
src << "You will no longer hear ambient sounds."
|
||||
|
||||
@@ -409,8 +409,8 @@ var/list/department_radio_keys = list(
|
||||
if(message_mode == null && fexists("sound/playervoices/[src.ckey].ogg"))
|
||||
if(M.client)
|
||||
if(M.client.prefs)
|
||||
if(M.client.prefs.toggles & SOUND_VOICES)
|
||||
playsound(src.loc, "sound/playervoices/[src.ckey].ogg", 70, 0, 5, 1)
|
||||
if(M.client.prefs.sound & SOUND_VOICES)
|
||||
playsound_local(src.loc, "sound/playervoices/[src.ckey].ogg", 70, 0, 5, 1)
|
||||
if(!istype(M, /mob/new_player))
|
||||
if(M && M.stat == DEAD)
|
||||
if ((M.client.prefs.toggles & CHAT_GHOSTEARS) && M in onscreen)
|
||||
|
||||
Reference in New Issue
Block a user