mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Sound Additions + Tweaks
Changes listed below: * Makes Death Sounds mutable on their own audio channel. * Makes Ear Ringing use the HUD Channel for sounds Additions: * [Adds On Fire effect](https://streamable.com/c1fxeo) * Adds Stunned effect(https://streamable.com/v2if0s) * [Adds SMES humming based on power usage in/out. Affected by walls, will only play if in LOS and visible.](https://streamable.com/z41x90) * [Adds Atmos Alerts making a noise on the monitor](https://streamable.com/uhegq6) * [Tcomms + PDA servers hum when powered and active, also respects walls/LOS](https://streamable.com/vb08x1) * [Fridges hum quietly while powered](https://streamable.com/c3zsz7) * [Point Defense turrets now make a sound audible from inside the station when firing, to add more spice to meteor waves.](https://streamable.com/bf8mwl) * Shield Generators now hum when active.
This commit is contained in:
@@ -19,6 +19,9 @@
|
||||
var/dos_capacity = 500 // Amount of DoS "packets" in buffer required to crash the relay
|
||||
var/dos_dissipate = 1 // Amount of DoS "packets" dissipated over time.
|
||||
|
||||
var/datum/looping_sound/tcomms/soundloop // CHOMPStation Add: Hummy noises
|
||||
var/noisy = TRUE // CHOMPStation Add: Hummy noises
|
||||
|
||||
|
||||
// TODO: Implement more logic here. For now it's only a placeholder.
|
||||
/obj/machinery/ntnet_relay/operable()
|
||||
@@ -33,8 +36,13 @@
|
||||
/obj/machinery/ntnet_relay/update_icon()
|
||||
if(operable())
|
||||
icon_state = initial(icon_state)
|
||||
if(!noisy)
|
||||
soundloop.start() // CHOMPStation Add: Hummy noises
|
||||
noisy = TRUE // CHOMPStation Add: Hummy noises
|
||||
else
|
||||
icon_state = "[initial(icon_state)]_off"
|
||||
soundloop.stop() // CHOMPStation Add: Hummy noises
|
||||
noisy = FALSE // CHOMPStation Add: Hummy noises
|
||||
|
||||
/obj/machinery/ntnet_relay/process()
|
||||
if(operable())
|
||||
@@ -106,6 +114,20 @@
|
||||
ntnet_global.relays.Add(src)
|
||||
NTNet = ntnet_global
|
||||
ntnet_global.add_log("New quantum relay activated. Current amount of linked relays: [NTNet.relays.len]")
|
||||
// CHOMPAdd: PDA Multicaster Server humming
|
||||
soundloop = new(list(src), FALSE)
|
||||
if(prob(60)) // 60% chance to change the midloop
|
||||
if(prob(40))
|
||||
soundloop.mid_sounds = list('sound/machines/tcomms/tcomms_02.ogg' = 1)
|
||||
soundloop.mid_length = 40
|
||||
else if(prob(20))
|
||||
soundloop.mid_sounds = list('sound/machines/tcomms/tcomms_03.ogg' = 1)
|
||||
soundloop.mid_length = 10
|
||||
else
|
||||
soundloop.mid_sounds = list('sound/machines/tcomms/tcomms_04.ogg' = 1)
|
||||
soundloop.mid_length = 30
|
||||
soundloop.start() // Have to do this here bc it starts on
|
||||
// CHOMPAdd End
|
||||
|
||||
/obj/machinery/ntnet_relay/Destroy()
|
||||
if(ntnet_global)
|
||||
@@ -115,6 +137,7 @@
|
||||
for(var/datum/computer_file/program/ntnet_dos/D in dos_sources)
|
||||
D.target = null
|
||||
D.error = "Connection to quantum relay severed"
|
||||
QDEL_NULL(soundloop)
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/ntnet_relay/attackby(var/obj/item/W as obj, var/mob/user as mob)
|
||||
|
||||
@@ -86,9 +86,9 @@
|
||||
. += emissive_appearance(overlay_icon, icon_state_screensaver)
|
||||
set_light(0)
|
||||
return add_overlay(.)
|
||||
|
||||
|
||||
set_light(light_strength)
|
||||
|
||||
|
||||
if(active_program)
|
||||
var/program_state = active_program.program_icon_state ? active_program.program_icon_state : icon_state_menu
|
||||
. += mutable_appearance(overlay_icon, program_state)
|
||||
@@ -98,7 +98,7 @@
|
||||
else
|
||||
. += mutable_appearance(overlay_icon, icon_state_menu)
|
||||
. += emissive_appearance(overlay_icon, icon_state_menu)
|
||||
|
||||
|
||||
return add_overlay(.)
|
||||
|
||||
/obj/item/modular_computer/proc/turn_on(var/mob/user)
|
||||
@@ -119,6 +119,7 @@
|
||||
else
|
||||
to_chat(user, "You press the power button and start up \the [src]")
|
||||
enable_computer(user)
|
||||
playsound(src, 'modular_chomp/sound/machines/console_power_on.ogg', 60, 1, volume_channel = VOLUME_CHANNEL_MACHINERY)
|
||||
|
||||
else // Unpowered
|
||||
if(issynth)
|
||||
@@ -297,4 +298,4 @@
|
||||
if(hard_drive)
|
||||
. = hard_drive.find_file_by_uid(uid)
|
||||
if(portable_drive && !.)
|
||||
. = portable_drive.find_file_by_uid(uid)
|
||||
. = portable_drive.find_file_by_uid(uid)
|
||||
|
||||
Reference in New Issue
Block a user