mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 12:07:27 +01:00
Ports Ambience Subsystem (#15613)
* Ports Ambience Subsystem * re-include
This commit is contained in:
@@ -30,8 +30,8 @@
|
||||
///////////////
|
||||
//SOUND STUFF//
|
||||
///////////////
|
||||
var/ambience_playing = 0
|
||||
var/played = 0
|
||||
|
||||
var/ambience_playing = FALSE
|
||||
|
||||
////////////
|
||||
//SECURITY//
|
||||
|
||||
@@ -368,6 +368,8 @@
|
||||
if(!winexists(src, "asset_cache_browser")) // The client is using a custom skin, tell them.
|
||||
to_chat(src, "<span class='warning'>Unable to access asset cache browser, if you are using a custom skin file, please allow DS to download the updated version, if you are not, then make a bug report. This is not a critical issue but can cause issues with resource downloading, as it is impossible to know when extra resources arrived to you.</span>")
|
||||
|
||||
update_ambience_pref()
|
||||
|
||||
//This is down here because of the browse() calls in tooltip/New()
|
||||
if(!tooltips)
|
||||
tooltips = new /datum/tooltip(src)
|
||||
@@ -422,6 +424,7 @@
|
||||
if(movingmob)
|
||||
movingmob.client_mobs_in_contents -= mob
|
||||
UNSETEMPTY(movingmob.client_mobs_in_contents)
|
||||
SSambience.ambience_listening_clients -= src
|
||||
Master.UpdateTickRate()
|
||||
..() //Even though we're going to be hard deleted there are still some things that want to know the destroy is happening
|
||||
return QDEL_HINT_HARDDEL_NOW
|
||||
@@ -1218,6 +1221,13 @@
|
||||
if(show_warning)
|
||||
message_admins("<font color='red'>[ckey] has just connected and has a history of [cidcount] different CIDs.</font> (<a href='?_src_=holder;webtools=[ckey]'>WebInfo</a>) (<a href='?_src_=holder;suppresscidwarning=[ckey]'>Suppress Warning</a>)")
|
||||
|
||||
/client/proc/update_ambience_pref()
|
||||
if(prefs.sound & SOUND_AMBIENCE)
|
||||
if(SSambience.ambience_listening_clients[src] > world.time)
|
||||
return // If already properly set we don't want to reset the timer.
|
||||
SSambience.ambience_listening_clients[src] = world.time + 10 SECONDS //Just wait 10 seconds before the next one aight mate? cheers.
|
||||
else
|
||||
SSambience.ambience_listening_clients -= src
|
||||
|
||||
#undef LIMITER_SIZE
|
||||
#undef CURRENT_SECOND
|
||||
|
||||
@@ -179,6 +179,7 @@
|
||||
else
|
||||
to_chat(src, "You will no longer hear ambient sounds.")
|
||||
usr.stop_sound_channel(CHANNEL_AMBIENCE)
|
||||
update_ambience_pref()
|
||||
SSblackbox.record_feedback("tally", "toggle_verbs", 1, "Toggle Ambience") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/verb/Toggle_Buzz() //No more headaches because headphones bump up shipambience.ogg to insanity levels.
|
||||
|
||||
Reference in New Issue
Block a user