diff --git a/code/datums/looping_sounds/misc_sounds.dm b/code/datums/looping_sounds/misc_sounds.dm index 6411b3f51f4a..318ac7b331b7 100644 --- a/code/datums/looping_sounds/misc_sounds.dm +++ b/code/datums/looping_sounds/misc_sounds.dm @@ -1,3 +1,24 @@ /datum/looping_sound/looping_launch_announcement_alarm mid_sounds = list('sound/vehicles/Dropships/single_alarm_brr_dropship_1.ogg' = 1) start_sound = list('sound/vehicles/Dropships/single_alarm_brr_dropship_1.ogg' = 1) + +/datum/looping_sound/telephone/ring + start_sound = 'sound/machines/telephone/dial.ogg' + start_length = 3.2 SECONDS + mid_sounds = 'sound/machines/telephone/ring_outgoing.ogg' + mid_length = 2.1 SECONDS + volume = 10 + +/datum/looping_sound/telephone/busy + start_sound = 'sound/voice/callstation_unavailable.ogg' + start_length = 5.7 SECONDS + mid_sounds = 'sound/machines/telephone/phone_busy.ogg' + mid_length = 5 SECONDS + volume = 15 + +/datum/looping_sound/telephone/hangup + start_sound = 'sound/machines/telephone/remote_hangup.ogg' + start_length = 0.6 SECONDS + mid_sounds = 'sound/machines/telephone/phone_busy.ogg' + mid_length = 5 SECONDS + volume = 15 diff --git a/code/game/sound.dm b/code/game/sound.dm index 1ab8fc42f41a..825b4c2740bd 100644 --- a/code/game/sound.dm +++ b/code/game/sound.dm @@ -365,6 +365,8 @@ S = pick('sound/voice/upp_warcry/warcry_female_1.ogg', 'sound/voice/upp_warcry/warcry_female_2.ogg') if("rtb_handset") S = pick('sound/machines/telephone/rtb_handset_1.ogg', 'sound/machines/telephone/rtb_handset_2.ogg', 'sound/machines/telephone/rtb_handset_3.ogg', 'sound/machines/telephone/rtb_handset_4.ogg', 'sound/machines/telephone/rtb_handset_5.ogg') + if("talk_phone") + S = pick('sound/machines/telephone/talk_phone1.ogg', 'sound/machines/telephone/talk_phone2.ogg', 'sound/machines/telephone/talk_phone3.ogg', 'sound/machines/telephone/talk_phone4.ogg', 'sound/machines/telephone/talk_phone5.ogg', 'sound/machines/telephone/talk_phone6.ogg', 'sound/machines/telephone/talk_phone7.ogg') if("bone_break") S = pick('sound/effects/bone_break1.ogg','sound/effects/bone_break2.ogg','sound/effects/bone_break3.ogg','sound/effects/bone_break4.ogg','sound/effects/bone_break5.ogg','sound/effects/bone_break6.ogg','sound/effects/bone_break7.ogg') if("plush") diff --git a/code/modules/cm_phone/phone.dm b/code/modules/cm_phone/phone.dm index 231bf54475d3..b600f9fb67cb 100644 --- a/code/modules/cm_phone/phone.dm +++ b/code/modules/cm_phone/phone.dm @@ -37,6 +37,10 @@ GLOBAL_LIST_EMPTY_TYPED(transmitters, /obj/structure/transmitter) var/list/networks_receive = list(FACTION_MARINE) var/list/networks_transmit = list(FACTION_MARINE) + var/datum/looping_sound/telephone/busy/busy_loop + var/datum/looping_sound/telephone/hangup/hangup_loop + var/datum/looping_sound/telephone/ring/outring_loop + /obj/structure/transmitter/hidden do_not_disturb = PHONE_DND_FORCED @@ -51,6 +55,10 @@ GLOBAL_LIST_EMPTY_TYPED(transmitters, /obj/structure/transmitter) if(!get_turf(src)) return + outring_loop = new(attached_to) + busy_loop = new(attached_to) + hangup_loop = new(attached_to) + GLOB.transmitters += src /obj/structure/transmitter/update_icon() @@ -184,6 +192,7 @@ GLOBAL_LIST_EMPTY_TYPED(transmitters, /obj/structure/transmitter) to_chat(user, SPAN_PURPLE("[icon2html(src, user)] Dialing [calling_phone_id]..")) playsound(get_turf(user), "rtb_handset") timeout_timer_id = addtimer(CALLBACK(src, PROC_REF(reset_call), TRUE), timeout_duration, TIMER_UNIQUE|TIMER_OVERRIDE|TIMER_STOPPABLE) + outring_loop.start() START_PROCESSING(SSobj, src) START_PROCESSING(SSobj, T) @@ -223,6 +232,7 @@ GLOBAL_LIST_EMPTY_TYPED(transmitters, /obj/structure/transmitter) if(T.attached_to && ismob(T.attached_to.loc)) var/mob/M = T.attached_to.loc to_chat(M, SPAN_PURPLE("[icon2html(src, M)] [phone_id] has picked up.")) + playsound(T.attached_to.loc, 'sound/machines/telephone/remote_pickup.ogg', 20) if(T.timeout_timer_id) deltimer(T.timeout_timer_id) T.timeout_timer_id = null @@ -230,6 +240,7 @@ GLOBAL_LIST_EMPTY_TYPED(transmitters, /obj/structure/transmitter) to_chat(user, SPAN_PURPLE("[icon2html(src, user)] Picked up a call from [T.phone_id].")) playsound(get_turf(user), "rtb_handset") + T.outring_loop.stop() user.put_in_active_hand(attached_to) update_icon() @@ -254,11 +265,14 @@ GLOBAL_LIST_EMPTY_TYPED(transmitters, /obj/structure/transmitter) if(T.attached_to && ismob(T.attached_to.loc)) var/mob/M = T.attached_to.loc to_chat(M, SPAN_PURPLE("[icon2html(src, M)] [phone_id] has hung up on you.")) + T.hangup_loop.start() if(attached_to && ismob(attached_to.loc)) var/mob/M = attached_to.loc if(timeout) - to_chat(M, SPAN_PURPLE("[icon2html(src, M)] Your call to [T.phone_id] has reached voicemail, you immediately disconnect the line.")) + to_chat(M, SPAN_PURPLE("[icon2html(src, M)] Your call to [T.phone_id] has reached voicemail, nobody picked up the phone.")) + busy_loop.start() + outring_loop.stop() else to_chat(M, SPAN_PURPLE("[icon2html(src, M)] You have hung up on [T.phone_id].")) @@ -282,6 +296,8 @@ GLOBAL_LIST_EMPTY_TYPED(transmitters, /obj/structure/transmitter) T.update_icon() STOP_PROCESSING(SSobj, T) + outring_loop.stop() + STOP_PROCESSING(SSobj, src) /obj/structure/transmitter/process() @@ -319,9 +335,12 @@ GLOBAL_LIST_EMPTY_TYPED(transmitters, /obj/structure/transmitter) var/mob/M = attached_to.loc M.drop_held_item(attached_to) playsound(get_turf(M), "rtb_handset", 100, FALSE, 7) + hangup_loop.stop() attached_to.forceMove(src) reset_call() + busy_loop.stop() + outring_loop.stop() update_icon() @@ -347,6 +366,7 @@ GLOBAL_LIST_EMPTY_TYPED(transmitters, /obj/structure/transmitter) P.handle_hear(message, L, speaking) attached_to.handle_hear(message, L, speaking) + playsound(P, "talk_phone", 5) log_say("TELEPHONE: [key_name(speaking)] on Phone '[phone_id]' to '[T.phone_id]' said '[message]'") /obj/structure/transmitter/attackby(obj/item/W, mob/user) diff --git a/sound/machines/telephone/dial.ogg b/sound/machines/telephone/dial.ogg new file mode 100644 index 000000000000..0dffcc34cca7 Binary files /dev/null and b/sound/machines/telephone/dial.ogg differ diff --git a/sound/machines/telephone/phone_busy.ogg b/sound/machines/telephone/phone_busy.ogg new file mode 100644 index 000000000000..3ddb26e62cb3 Binary files /dev/null and b/sound/machines/telephone/phone_busy.ogg differ diff --git a/sound/machines/telephone/remote_hangup.ogg b/sound/machines/telephone/remote_hangup.ogg new file mode 100644 index 000000000000..f646548a5ebb Binary files /dev/null and b/sound/machines/telephone/remote_hangup.ogg differ diff --git a/sound/machines/telephone/remote_pickup.ogg b/sound/machines/telephone/remote_pickup.ogg new file mode 100644 index 000000000000..7d2cb8297c24 Binary files /dev/null and b/sound/machines/telephone/remote_pickup.ogg differ diff --git a/sound/machines/telephone/ring_outgoing.ogg b/sound/machines/telephone/ring_outgoing.ogg new file mode 100644 index 000000000000..67db23c49b20 Binary files /dev/null and b/sound/machines/telephone/ring_outgoing.ogg differ diff --git a/sound/machines/telephone/talk_phone1.ogg b/sound/machines/telephone/talk_phone1.ogg new file mode 100644 index 000000000000..53a665a389d1 Binary files /dev/null and b/sound/machines/telephone/talk_phone1.ogg differ diff --git a/sound/machines/telephone/talk_phone2.ogg b/sound/machines/telephone/talk_phone2.ogg new file mode 100644 index 000000000000..e0b39b36b85d Binary files /dev/null and b/sound/machines/telephone/talk_phone2.ogg differ diff --git a/sound/machines/telephone/talk_phone3.ogg b/sound/machines/telephone/talk_phone3.ogg new file mode 100644 index 000000000000..abdb73b8a87d Binary files /dev/null and b/sound/machines/telephone/talk_phone3.ogg differ diff --git a/sound/machines/telephone/talk_phone4.ogg b/sound/machines/telephone/talk_phone4.ogg new file mode 100644 index 000000000000..6809d1951ca8 Binary files /dev/null and b/sound/machines/telephone/talk_phone4.ogg differ diff --git a/sound/machines/telephone/talk_phone5.ogg b/sound/machines/telephone/talk_phone5.ogg new file mode 100644 index 000000000000..12b3619103b1 Binary files /dev/null and b/sound/machines/telephone/talk_phone5.ogg differ diff --git a/sound/machines/telephone/talk_phone6.ogg b/sound/machines/telephone/talk_phone6.ogg new file mode 100644 index 000000000000..b617fbd4b54f Binary files /dev/null and b/sound/machines/telephone/talk_phone6.ogg differ diff --git a/sound/machines/telephone/talk_phone7.ogg b/sound/machines/telephone/talk_phone7.ogg new file mode 100644 index 000000000000..f7055617efbc Binary files /dev/null and b/sound/machines/telephone/talk_phone7.ogg differ diff --git a/sound/voice/callstation_unavailable.ogg b/sound/voice/callstation_unavailable.ogg new file mode 100644 index 000000000000..992e87fa5703 Binary files /dev/null and b/sound/voice/callstation_unavailable.ogg differ