diff --git a/code/datums/looping_sounds/misc_sounds.dm b/code/datums/looping_sounds/misc_sounds.dm index 6411b3f51f4a..a408b75dcf41 100644 --- a/code/datums/looping_sounds/misc_sounds.dm +++ b/code/datums/looping_sounds/misc_sounds.dm @@ -1,3 +1,8 @@ /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/looping_cycle_launch_announcement_alarm + mid_sounds = list('sound/vehicles/Dropships/single_alarm_cycle_dropship_1.ogg') + start_sound = list('sound/vehicles/Dropships/single_alarm_cycle_dropship_1.ogg') diff --git a/code/modules/shuttle/computers/dropship_computer.dm b/code/modules/shuttle/computers/dropship_computer.dm index 08a35b83071d..fce9d42b25bc 100644 --- a/code/modules/shuttle/computers/dropship_computer.dm +++ b/code/modules/shuttle/computers/dropship_computer.dm @@ -220,7 +220,7 @@ if(xeno.hive_pos != XENO_QUEEN) // If the 'about to launch' alarm is playing, a xeno can whack the computer to stop it. if(dropship.playing_launch_announcement_alarm) - stop_playing_launch_announcement_alarm() + stop_all_alarms() xeno.animation_attack_on(src) to_chat(xeno, SPAN_XENONOTICE("We slash at [src], silencing its squawking!")) playsound(loc, 'sound/machines/terminal_shutdown.ogg', 20) @@ -252,7 +252,7 @@ addtimer(CALLBACK(GLOB.almayer_orbital_cannon, TYPE_PROC_REF(/obj/structure/orbital_cannon, enable)), 10 MINUTES, TIMER_UNIQUE) if(!GLOB.resin_lz_allowed) set_lz_resin_allowed(TRUE) - stop_playing_launch_announcement_alarm() + stop_all_alarms() to_chat(xeno, SPAN_XENONOTICE("You override the doors.")) xeno_message(SPAN_XENOANNOUNCE("The doors of the metal bird have been overridden! Rejoice!"), 3, xeno.hivenumber) @@ -359,6 +359,7 @@ // Launch Alarm Variables .["playing_launch_announcement_alarm"] = shuttle.playing_launch_announcement_alarm + .["playing_cycle_launch_announcement_alarm"] = shuttle.playing_cycle_launch_announcement_alarm .["destinations"] = list() // add flight @@ -422,7 +423,7 @@ msg_admin_niche(log) log_interact(user, msg = "[log]") shuttle.send_for_flyby() - stop_playing_launch_announcement_alarm() + stop_all_alarms() return TRUE update_equipment(is_optimised, FALSE) @@ -452,7 +453,7 @@ var/log = "[key_name(user)] launched the dropship [src.shuttleId] on transport." msg_admin_niche(log) log_interact(user, msg = "[log]") - stop_playing_launch_announcement_alarm() + stop_all_alarms() return TRUE if("button-push") playsound(loc, get_sfx("terminal_button"), KEYBOARD_SOUND_VOLUME, 1) @@ -523,6 +524,23 @@ stop_playing_launch_announcement_alarm() return + //Cycle alarms - for cycling, not evacuating. + if("play_cycle_launch_announcement_alarm") + if (shuttle.mode != SHUTTLE_IDLE && shuttle.mode != SHUTTLE_RECHARGING) + to_chat(usr, SPAN_WARNING("The Launch Announcement Alarm is designed to tell people that you're going to take off soon.")) + return + shuttle.cycle_alarm_sound_loop.start() + shuttle.playing_cycle_launch_announcement_alarm = TRUE + return + if ("stop_playing_cycle_launch_announcement_alarm") + stop_playing_launch_cycle_announcement_alarm() + return + + +/obj/structure/machinery/computer/shuttle/dropship/flight/proc/stop_all_alarms() + stop_playing_launch_announcement_alarm() + stop_playing_launch_cycle_announcement_alarm() + /obj/structure/machinery/computer/shuttle/dropship/flight/proc/stop_playing_launch_announcement_alarm() var/obj/docking_port/mobile/marine_dropship/shuttle = SSshuttle.getShuttle(shuttleId) @@ -530,6 +548,13 @@ shuttle.playing_launch_announcement_alarm = FALSE return +/obj/structure/machinery/computer/shuttle/dropship/flight/proc/stop_playing_launch_cycle_announcement_alarm() + var/obj/docking_port/mobile/marine_dropship/shuttle = SSshuttle.getShuttle(shuttleId) + + shuttle.cycle_alarm_sound_loop.stop() + shuttle.playing_cycle_launch_announcement_alarm = FALSE + return + /obj/structure/machinery/computer/shuttle/dropship/flight/lz1 icon = 'icons/obj/structures/machinery/computer.dmi' icon_state = "shuttle" diff --git a/code/modules/shuttle/shuttle.dm b/code/modules/shuttle/shuttle.dm index fc4b0ccd2ee9..c6a0e7dfa4d5 100644 --- a/code/modules/shuttle/shuttle.dm +++ b/code/modules/shuttle/shuttle.dm @@ -343,6 +343,8 @@ var/playing_launch_announcement_alarm = FALSE // FALSE = off ; TRUE = on var/datum/looping_sound/looping_launch_announcement_alarm/alarm_sound_loop + var/playing_cycle_launch_announcement_alarm = FALSE // FALSE = off ; TRUE = on + var/datum/looping_sound/looping_cycle_launch_announcement_alarm/cycle_alarm_sound_loop var/landing_sound = 'sound/effects/engine_landing.ogg' var/ignition_sound = 'sound/effects/engine_startup.ogg' @@ -457,6 +459,7 @@ /obj/docking_port/mobile/Destroy(force) if(force) QDEL_NULL(alarm_sound_loop) + QDEL_NULL(cycle_alarm_sound_loop) SSshuttle.mobile -= src destination = null previous = null @@ -492,6 +495,14 @@ alarm_sound_loop.is_sound_projecting = TRUE alarm_sound_loop.falloff_distance = 7 + //Cycle Launch Announcement Alarm + cycle_alarm_sound_loop = new(src) + cycle_alarm_sound_loop.mid_length = 20 + cycle_alarm_sound_loop.extra_range = 30 + cycle_alarm_sound_loop.volume = 100 + cycle_alarm_sound_loop.is_sound_projecting = TRUE + cycle_alarm_sound_loop.falloff_distance = 7 + #ifdef DOCKING_PORT_HIGHLIGHT highlight("#0f0") #endif diff --git a/sound/vehicles/Dropships/single_alarm_cycle_dropship_1.ogg b/sound/vehicles/Dropships/single_alarm_cycle_dropship_1.ogg new file mode 100644 index 000000000000..58683dd4e33d Binary files /dev/null and b/sound/vehicles/Dropships/single_alarm_cycle_dropship_1.ogg differ diff --git a/sound/vehicles/Dropships/triple_alarm_cycle_dropship_1.ogg b/sound/vehicles/Dropships/triple_alarm_cycle_dropship_1.ogg new file mode 100644 index 000000000000..fc70b674776f Binary files /dev/null and b/sound/vehicles/Dropships/triple_alarm_cycle_dropship_1.ogg differ diff --git a/tgui/packages/tgui/interfaces/DropshipFlightControl.tsx b/tgui/packages/tgui/interfaces/DropshipFlightControl.tsx index 4e21b8223660..c5183ebf77ea 100644 --- a/tgui/packages/tgui/interfaces/DropshipFlightControl.tsx +++ b/tgui/packages/tgui/interfaces/DropshipFlightControl.tsx @@ -50,6 +50,7 @@ interface DropshipNavigationProps extends NavigationProps { has_flyby_skill: 0 | 1; playing_launch_announcement_alarm: boolean; + playing_cycle_launch_announcement_alarm: boolean } const DropshipDoorControl = () => { @@ -329,7 +330,7 @@ const StopLaunchAnnouncementAlarm = () => { act('stop_playing_launch_announcement_alarm'); }} > - Stop Alarm + Stop Main Alarm ); }; @@ -343,7 +344,35 @@ const PlayLaunchAnnouncementAlarm = () => { act('play_launch_announcement_alarm'); }} > - Start Alarm + Start Main Alarm + + ); +}; + +const StopCycleLaunchAnnouncementAlarm = () => { + const { act } = useBackend(); + return ( + + ); +}; + +const PlayCycleLaunchAnnouncementAlarm = () => { + const { act } = useBackend(); + return ( + ); }; @@ -358,13 +387,31 @@ const LaunchAnnouncementAlarm = () => {
- ) : ( - - ) + (!data.playing_launch_announcement_alarm ? + ( ) + : + ( ) + ) } - /> + > + + { + (!data.playing_launch_announcement_alarm ? + ( ) + : + ( ) + ) + } + + { + (!data.playing_cycle_launch_announcement_alarm ? + ( ) + : + ( ) + ) + } + +
); }; @@ -392,7 +439,7 @@ const RenderScreen = (props) => { export const DropshipFlightControl = (props) => { const { data } = useBackend(); return ( - + {data.is_disabled === 1 && } {data.is_disabled === 0 && }