Skip to content

Commit

Permalink
GM Sound Panel [WIP] (#255)
Browse files Browse the repository at this point in the history
  • Loading branch information
Doubleumc authored Jun 8, 2024
1 parent 93d95b5 commit 93aa0e8
Show file tree
Hide file tree
Showing 7 changed files with 958 additions and 112 deletions.
3 changes: 2 additions & 1 deletion code/__DEFINES/sounds.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#define FALLOFF_SOUNDS 1

#define FREE_CHAN_END 1016
#define FREE_CHAN_END 1014
#define INITIAL_SOUNDSCAPE_COOLDOWN 20

#define EAR_DEAF_MUTE 1
Expand All @@ -21,6 +21,7 @@
#define ITEM_EQUIP_VOLUME 50

//Reserved channels
#define SOUND_CHANNEL_TEST 1015
#define SOUND_CHANNEL_NOTIFY 1016
#define SOUND_CHANNEL_VOX 1017
#define SOUND_CHANNEL_MUSIC 1018
Expand Down
4 changes: 3 additions & 1 deletion code/datums/soundOutput.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,16 @@
. = ..()

/datum/soundOutput/proc/process_sound(datum/sound_template/T)
var/sound/S = sound(T.file, T.wait, T.repeat)
var/sound/S = sound(T.file, T.repeat, T.wait)
S.volume = owner.volume_preferences[T.volume_cat] * T.volume
if(T.channel == 0)
S.channel = get_free_channel()
else
S.channel = T.channel
S.frequency = T.frequency
S.falloff = T.falloff
S.offset = T.offset
S.pitch = T.pitch
S.status = T.status
S.echo = T.echo
if(T.x && T.y && T.z)
Expand Down
Loading

0 comments on commit 93aa0e8

Please sign in to comment.