Merge pull request #12898 from ItsSelis/pda-exonet

Communicator Ringtones
This commit is contained in:
Novacat
2022-05-04 20:44:21 -04:00
committed by GitHub
6 changed files with 36 additions and 3 deletions
@@ -340,6 +340,11 @@
if("toggle_ringer")
ringer = !ringer
if("set_ringer_tone")
var/ringtone = tgui_input_text(usr, "Set Ringer Tone", "Ringer")
if(ringtone)
ttone = ringtone
if("selfie_mode")
selfie_mode = !selfie_mode
@@ -75,6 +75,20 @@ var/global/list/obj/item/device/communicator/all_communicators = list()
// If you turn this on, it changes the way communicator video works. User configurable option.
var/selfie_mode = FALSE
// Ringtones! (Based on the PDA ones)
var/ttone = "beep" //The ringtone!
var/list/ttone_sound = list("beep" = 'sound/machines/twobeep.ogg',
"boom" = 'sound/effects/explosionfar.ogg',
"slip" = 'sound/misc/slip.ogg',
"honk" = 'sound/items/bikehorn.ogg',
"SKREE" = 'sound/voice/shriek1.ogg',
// "holy" = 'sound/items/PDA/ambicha4-short.ogg',
"xeno" = 'sound/voice/hiss1.ogg',
"dust" = 'sound/effects/supermatter.ogg',
"spark" = 'sound/effects/sparks4.ogg',
"rad" = 'sound/items/geiger/high1.ogg',
"servo" = 'sound/machines/rig/rigservo.ogg')
// Proc: New()
// Parameters: None
// Description: Adds the new communicator to the global list of all communicators, sorts the list, obtains a reference to the Exonet node, then tries to
@@ -76,9 +76,15 @@
return
if(ringer)
playsound(src, 'sound/machines/twobeep.ogg', 50, 1)
var/S
if(ttone in ttone_sound)
S = ttone_sound[ttone]
else
S = 'sound/machines/twobeep.ogg'
playsound(src, S, 50, 1)
for (var/mob/O in hearers(2, loc))
O.show_message(text("[bicon(src)] *beep*"))
O.show_message(text("[bicon(src)] *[ttone]*"))
alert_called = 1
update_icon()
@@ -1129,6 +1129,10 @@ const SettingsTab = (props, context) => {
: "Ringer off."
}
onClick={() => act("toggle_ringer")} />
<Button
fluid
content="Set Ringer Tone"
onClick={() => act("set_ringer_tone")} />
</LabeledList.Item>
</LabeledList>
</Section>
@@ -63,6 +63,10 @@ const ActiveConversation = (props, context) => {
}
height="450px"
stretchContents>
<Button
icon="comment"
onClick={() => act("Message", { "target": active_conversation })}
content="Reply" />
<Section style={{
"height": "97%",
"overflow-y": "auto",
File diff suppressed because one or more lines are too long