forked from tgstation/tgstation
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
77 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
|
||
#include "code/antagonists_intro.dm" | ||
#include "code/closet.dm" | ||
#include "code/shuttle.dm" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/obj/docking_port/mobile | ||
/// Tracks whether the hyperspace warmup sound has been played during the shuttle's ignition phase | ||
var/sound_played_start = FALSE | ||
/// Tracks whether the hyperspace end sound has been played during the shuttle's call or landing phase | ||
var/sound_played_end = FALSE | ||
/// Custom sound for shuttle's HYPERSPACE_WARMUP. Doesn't include emergency & arrival shuttles | ||
var/custom_hyperspace_warmup_sound = 'modular_bandastation/aesthetics_sounds/sound/shuttle/hyperspace_mini.ogg' | ||
/// Custom sound for shuttle's HYPERSPACE_END. Doesn't include emergency & arrival shuttles | ||
var/custom_hyperspace_end_sound = 'modular_bandastation/aesthetics_sounds/sound/shuttle/hyperspace_end_new.ogg' | ||
|
||
/obj/docking_port/mobile/get_custom_sound(phase) | ||
if(shuttle_id != "emergency" && shuttle_id != "arrival") | ||
switch(phase) | ||
if(HYPERSPACE_WARMUP) | ||
return custom_hyperspace_warmup_sound | ||
if(HYPERSPACE_END) | ||
return custom_hyperspace_end_sound | ||
return ..() | ||
|
||
/obj/docking_port/mobile/check() | ||
. = ..() | ||
// We already have in core sounds for emergency & arrival shuttles | ||
if(shuttle_id != "emergency" && shuttle_id != "arrival") | ||
switch(mode) | ||
if(SHUTTLE_IGNITING) | ||
if(!sound_played_start) | ||
var/list/areas = list() | ||
for(var/area/shuttle/S in shuttle_areas) | ||
areas += S | ||
// Check if there are 2 seconds or less left before SHUTTLE_IGNITING ends | ||
if(timeLeft(1) <= 3 SECONDS) | ||
sound_played_start = TRUE | ||
hyperspace_sound(HYPERSPACE_WARMUP, areas) | ||
|
||
if(SHUTTLE_CALL) | ||
if(!sound_played_end) | ||
var/list/areas = list() | ||
for(var/area/shuttle/S in shuttle_areas) | ||
areas += S | ||
// Check if there are 2 seconds or less left before SHUTTLE_CALL ends | ||
if(timeLeft(1) <= 2 SECONDS) | ||
sound_played_end = TRUE | ||
hyperspace_sound(HYPERSPACE_END, areas) | ||
// Call shuttle arrival sound on destination (docking) point | ||
if(!destination_turf) | ||
stack_trace("Destination turf is invalid. Sound not played.") | ||
return | ||
playsound(destination_turf, 'modular_bandastation/aesthetics_sounds/sound/shuttle/hyperspace_end_new.ogg', vol = 100, vary = TRUE, pressure_affected = FALSE) | ||
|
||
if(SHUTTLE_IDLE) | ||
// Our sounds should be played once | ||
if(sound_played_start) | ||
sound_played_start = FALSE | ||
if(sound_played_end) | ||
sound_played_end = FALSE |
Binary file added
BIN
+798 KB
modular_bandastation/aesthetics_sounds/sound/shuttle/hyperspace_begin_new.ogg
Binary file not shown.
Binary file added
BIN
+356 KB
modular_bandastation/aesthetics_sounds/sound/shuttle/hyperspace_end_new.ogg
Binary file not shown.
Binary file added
BIN
+122 KB
modular_bandastation/aesthetics_sounds/sound/shuttle/hyperspace_mini.ogg
Binary file not shown.
Binary file added
BIN
+494 KB
modular_bandastation/aesthetics_sounds/sound/shuttle/hyperspace_mini_old.ogg
Binary file not shown.