diff --git a/code/__defines/misc.dm b/code/__defines/misc.dm
index 4beee94eba5..b9da1b915f9 100644
--- a/code/__defines/misc.dm
+++ b/code/__defines/misc.dm
@@ -31,16 +31,12 @@
// Some arbitrary defines to be used by self-pruning global lists. (see master_controller)
#define PROCESS_KILL 26 // Used to trigger removal from a processing list.
-// Age limits on a character.
-#define AGE_MIN 17
-#define AGE_MAX 85
-
#define MAX_GEAR_COST 15 // Used in chargen for accessory loadout limit.
// Preference toggles.
#define SOUND_ADMINHELP 0x1
#define SOUND_MIDI 0x2
-#define SOUND_AMBIENCE 0x4
+// 0x4 is free.
#define SOUND_LOBBY 0x8
#define CHAT_OOC 0x10
#define CHAT_DEAD 0x20
@@ -56,7 +52,8 @@
#define CHAT_NOICONS 0x8000
#define CHAT_GHOSTLOOC 0x10000
-//Note that 0x1 and 0x2 are free. Use those!
+// 0x1 is free.
+// 0x2 is free.
#define PROGRESS_BARS 0x4
#define PARALLAX_IS_STATIC 0x8
#define FLOATING_MESSAGES 0x10
@@ -64,7 +61,7 @@
#define FULLSCREEN_MODE 0x40
#define ACCENT_TAG_TEXT 0x80
-#define TOGGLES_DEFAULT (SOUND_ADMINHELP|SOUND_MIDI|SOUND_AMBIENCE|SOUND_LOBBY|CHAT_OOC|CHAT_DEAD|CHAT_GHOSTEARS|CHAT_GHOSTSIGHT|CHAT_PRAYER|CHAT_RADIO|CHAT_ATTACKLOGS|CHAT_LOOC|CHAT_GHOSTLOOC)
+#define TOGGLES_DEFAULT (SOUND_ADMINHELP | SOUND_MIDI | SOUND_LOBBY | CHAT_OOC | CHAT_DEAD | CHAT_GHOSTEARS | CHAT_GHOSTSIGHT | CHAT_PRAYER | CHAT_RADIO | CHAT_ATTACKLOGS | CHAT_LOOC | CHAT_GHOSTLOOC)
//Sound effects toggles
#define ASFX_AMBIENCE 1
@@ -75,8 +72,9 @@
#define ASFX_ARCADE 32
#define ASFX_RADIO 64
#define ASFX_INSTRUMENT 128
+#define ASFX_HUM 256
-#define ASFX_DEFAULT (ASFX_AMBIENCE|ASFX_FOOTSTEPS|ASFX_VOTE|ASFX_VOX|ASFX_DROPSOUND|ASFX_ARCADE|ASFX_RADIO|ASFX_INSTRUMENT)
+#define ASFX_DEFAULT (ASFX_AMBIENCE | ASFX_FOOTSTEPS | ASFX_VOTE | ASFX_VOX | ASFX_DROPSOUND | ASFX_ARCADE | ASFX_RADIO | ASFX_INSTRUMENT | ASFX_HUM)
// For secHUDs and medHUDs and variants. The number is the location of the image on the list hud_list of humans.
#define HEALTH_HUD 1 // A simple line reading the pulse.
diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm
index 2c3e000ee37..a4c4cf58716 100644
--- a/code/game/area/areas.dm
+++ b/code/game/area/areas.dm
@@ -1,8 +1,7 @@
-// Areas.dm
+//
+// Areas
+//
-
-
-// ===
/area
var/global/global_uid = 0
var/uid
@@ -46,7 +45,6 @@
var/air_doors_activated = 0
var/list/ambience = list()
var/list/forced_ambience = null
- var/loop_ambience = TRUE
var/sound_env = STANDARD_STATION
var/turf/base_turf //The base turf type of the area, which can be used to override the z-level's base turf
var/no_light_control = 0 // if 1, lights in area cannot be toggled with light controller
@@ -263,7 +261,7 @@
var/list/mob/living/forced_ambiance_list = new
/area/Entered(mob/living/L)
- if(!istype(L,/mob/living) || !ROUND_IS_STARTED)
+ if(!istype(L, /mob/living) || !ROUND_IS_STARTED)
return
if(!L.ckey) return
@@ -272,41 +270,50 @@ var/list/mob/living/forced_ambiance_list = new
L.lastarea = get_area(L.loc)
var/area/newarea = get_area(L.loc)
var/area/oldarea = L.lastarea
- if((oldarea.has_gravity() == 0) && (newarea.has_gravity() == 1) && (L.m_intent == M_RUN)) // Being ready when you change areas gives you a chance to avoid falling all together.
+ if((oldarea.has_gravity() == FALSE) && (newarea.has_gravity() == TRUE) && (L.m_intent == M_RUN)) // Being ready when you change areas gives you a chance to avoid falling all together.
thunk(L)
- L.update_floating( L.Check_Dense_Object() )
+ L.update_floating(L.Check_Dense_Object())
L.lastarea = newarea
- // Ambience goes down here -- make sure to list each area seperately for ease of adding things in later, thanks! Note: areas adjacent to each other should have the same sounds to prevent cutoff when possible.- LastyScratch
- if(!(L && L.client && (L.client.prefs.asfx_togs & ASFX_AMBIENCE))) return
+ // Start playing ambience.
+ if(L && L.client && (L.client.prefs.asfx_togs & ASFX_AMBIENCE) && !L.ear_deaf)
+ play_ambience(L)
+ else
+ stop_ambience(L)
- play_ambience(L)
+ // The dreaded ship ambience hum.
+ // Explanation for the "if" clause: If the mob exists, has a client, the client has the hum ASFX toggled on, the area the mob is in is a station area,
+ // the mob isn't deaf, and the client doesn't already have the ambient hum playing, then start playing the ambient hum.
+ if(L && L.client && (L.client.prefs.asfx_togs & ASFX_HUM) && newarea.station_area && !L.ear_deaf)
+ if(!L.client.ambient_hum_playing)
+ L.client.ambient_hum_playing = TRUE
+ L << sound('sound/ambience/shipambience.ogg', repeat = 1, volume = 35, channel = 2)
+ // Otherwise, stop playing the ambient hum.
+ else
+ L << sound(null, channel = 2)
+ L.client.ambient_hum_playing = FALSE
/area/proc/play_ambience(var/mob/living/L)
- // Ambience goes down here -- make sure to list each area seperately for ease of adding things in later, thanks! Note: areas adjacent to each other should have the same sounds to prevent cutoff when possible.- LastyScratch
- if(!(L && L.client && (L.client.prefs.toggles & SOUND_AMBIENCE))) return
-
- // If we previously were in an area with force-played ambiance, stop it.
+ // If we previously were in an area with force played ambience, stop it.
if(L in forced_ambiance_list)
L << sound(null, channel = 1)
forced_ambiance_list -= L
- if(!L.client.ambience_playing)
- L.client.ambience_playing = 1
- L << sound('sound/ambience/shipambience.ogg', repeat = loop_ambience, wait = 0, volume = 35, channel = 2)
-
if(forced_ambience)
if(forced_ambience.len)
forced_ambiance_list |= L
- L << sound(pick(forced_ambience), repeat = loop_ambience, wait = 0, volume = 25, channel = 1)
+ L << sound(pick(forced_ambience), repeat = 1, volume = 30, channel = 1)
else
L << sound(null, channel = 1)
- else if(src.ambience.len && prob(35))
- if((world.time >= L.client.played + 600))
+ else if(src.ambience.len)
+ if((world.time >= L.client.ambience_last_played_time + 30 SECONDS))
var/sound = pick(ambience)
- L << sound(sound, repeat = 0, wait = 0, volume = 25, channel = 1)
- L.client.played = world.time
+ L << sound(sound, volume = 30, channel = 1)
+ L.client.ambience_last_played_time = world.time
+
+/area/proc/stop_ambience(var/mob/living/L)
+ L << sound(null, channel = 1)
/area/proc/gravitychange(var/gravitystate = 0)
has_gravity = gravitystate
@@ -333,7 +340,7 @@ var/list/mob/living/forced_ambiance_list = new
else
H.AdjustStunned(1)
H.AdjustWeakened(1)
- to_chat(mob, "The sudden appearance of gravity makes you fall to the floor!")
+ to_chat(mob, SPAN_WARNING("The sudden appearance of gravity makes you fall to the floor!"))
/area/proc/prison_break()
for(var/obj/machinery/power/apc/temp_apc in src)
diff --git a/code/game/machinery/firealarm.dm b/code/game/machinery/firealarm.dm
index 4609785958f..a479ce5810e 100644
--- a/code/game/machinery/firealarm.dm
+++ b/code/game/machinery/firealarm.dm
@@ -230,12 +230,12 @@
return
/obj/machinery/firealarm/proc/alarm(var/duration = 0)
- if (!( src.working))
+ if(!(src.working))
return
var/area/area = get_area(src)
for(var/obj/machinery/firealarm/FA in area)
fire_alarm.triggerAlarm(loc, FA, duration)
- playsound(FA.loc, 'sound/ambience/firealarm.ogg', 75, 0)
+ playsound(get_turf(FA), 'sound/ambience/firealarm.ogg', 75, FALSE)
update_icon()
return
diff --git a/code/modules/client/client defines.dm b/code/modules/client/client defines.dm
index 9af5b8423da..77a7d7d8e48 100644
--- a/code/modules/client/client defines.dm
+++ b/code/modules/client/client defines.dm
@@ -1,24 +1,55 @@
+//
+// Client Defines
+//
+
/client
parent_type = /datum
- ////////////////
- //ADMIN THINGS//
- ////////////////
+// Admin
var/datum/admins/holder = null
var/datum/admins/deadmin_holder = null
- var/buildmode = 0
+ var/buildmode = 0
- ///////////////////
- //SPAM PROTECTION//
- ///////////////////
- var/last_message = "" //Contains the last message sent by this client - used to protect against copy-paste spamming.
- var/last_message_count = 0 //contins a number of how many times a message identical to last_message was sent.
+// Spam Protection
+ var/last_message = "" // Contains the last message sent by this client - used to protect against copy-paste spamming.
+ var/last_message_count = 0 // Contains a number of how many times a message identical to last_message was sent.
var/last_message_time
var/spam_alert = 0
- /////////
- //OTHER//
- /////////
+// Sounds
+ var/ambient_hum_playing = null // Is the ambient hum playing?
+ var/ambience_last_played_time = null // "world.time".
+
+// Security
+ var/info_sent = 0
+ // comment out the line below when debugging locally to enable the options & messages menu
+ //control_freak = 1
+ var/ip_intel = "Disabled"
+
+ var/received_discord_pm = -99999
+ var/discord_admin //IRC- no more IRC, K? Discord admin that spoke with them last.
+ var/mute_discord = 0
+
+// Database
+ var/player_age = "Requires database" // So admins know why it isn't working - Used to determine how old the account is - in days.
+ var/related_accounts_ip = "Requires database" //So admins know why it isn't working - Used to determine what other accounts previously logged in from this ip
+ var/related_accounts_cid = "Requires database" //So admins know why it isn't working - Used to determine what other accounts previously logged in from this computer id
+ var/whitelist_status = 0 //Used to determine what whitelists the player has access to. Uses bitflag values!
+ var/need_saves_migrated = "Requires database" //Used to determine whether or not the ckey needs their saves migrated over to the database. Default is 0 upon successful connection.
+ var/account_age = -1 // Age on the BYOND account in days.
+ var/account_join_date = null // Date of the BYOND account creation in ISO 8601 format.
+ var/unacked_warning_count = 0
+
+ preload_rsc = PRELOAD_RSC
+
+ var/authed = TRUE
+
+ var/is_initialized = FALSE // Used to track whether the client has been initialized with InitClient.
+
+ // Goonchat chat output of the client.
+ var/datum/chatOutput/chatOutput
+
+// Other
var/datum/preferences/prefs
var/datum/tooltip/tooltips
var/move_delay = 1
@@ -28,44 +59,4 @@
var/time_died_as_rat = 0
var/list/autofire_aiming_at[2]
- var/adminhelped = NOT_ADMINHELPED
-
- ///////////////
- //SOUND STUFF//
- ///////////////
- var/ambience_playing= null
- var/played = 0
-
- ////////////
- //SECURITY//
- ////////////
- var/info_sent = 0
- // comment out the line below when debugging locally to enable the options & messages menu
- //control_freak = 1
- var/ip_intel = "Disabled"
-
- var/received_discord_pm = -99999
- var/discord_admin //IRC- no more IRC, K? Discord admin that spoke with them last.
- var/mute_discord = 0
-
-
- ////////////////////////////////////
- //things that require the database//
- ////////////////////////////////////
- var/player_age = "Requires database" //So admins know why it isn't working - Used to determine how old the account is - in days.
- var/related_accounts_ip = "Requires database" //So admins know why it isn't working - Used to determine what other accounts previously logged in from this ip
- var/related_accounts_cid = "Requires database" //So admins know why it isn't working - Used to determine what other accounts previously logged in from this computer id
- var/whitelist_status = 0 //Used to determine what whitelists the player has access to. Uses bitflag values!
- var/need_saves_migrated = "Requires database" //Used to determine whether or not the ckey needs their saves migrated over to the database. Default is 0 upon successful connection.
- var/account_age = -1 // Age on the BYOND account in days.
- var/account_join_date = null // Date of the BYOND account creation in ISO 8601 format.
- var/unacked_warning_count = 0
-
- preload_rsc = PRELOAD_RSC
-
- var/authed = TRUE
-
- var/is_initialized = FALSE // Used to track whether the client has been initialized with InitClient.
-
- ///goonchat chatoutput of the client
- var/datum/chatOutput/chatOutput
+ var/adminhelped = NOT_ADMINHELPED
\ No newline at end of file
diff --git a/code/modules/client/preferences_ambience.dm b/code/modules/client/preferences_ambience.dm
index 84d57cf6059..d660eac7934 100644
--- a/code/modules/client/preferences_ambience.dm
+++ b/code/modules/client/preferences_ambience.dm
@@ -1,115 +1,119 @@
+// ASFX Toggles List
/var/global/asfx_togs = list(
-// /client/proc/Toggle_asfx,
-// /client/proc/Toggle_footsteps,
- /client/proc/Toggle_asfx_vote,
- /client/proc/Toggle_messagesounds,
- /client/proc/Toggle_dropsounds,
- /client/proc/Toggle_arcadesounds,
- /client/proc/Toggle_radiosounds,
- /client/proc/Toggle_instrumentsounds
+ /client/proc/toggle_footsteps,
+ /client/proc/toggle_asfx_vote,
+ /client/proc/toggle_messagesounds,
+ /client/proc/toggle_dropsounds,
+ /client/proc/toggle_arcadesounds,
+ /client/proc/toggle_radiosounds,
+ /client/proc/toggle_instrumentsounds
)
-/client/verb/asf_toggle()
- set name = "Open ASFX Tab"
+// ASFX Tab Toggle
+/client/verb/toggle_asfx_tab()
+ set name = "Toggle SFX Preferences Tab"
set category = "Preferences"
- set desc = "Open the ambience sound effects toggle tab"
+ set desc = "Toggle the SFX preferences tab"
verbs ^= asfx_togs
return
-/client/verb/Toggle_asfx() //Allgnew ambience should be added here so it works with this verb until someone better at things comes up with a fix that isn't awful
- set name = "Hear/Silence Ambience"
-// set category = "SoundFx Prefs"
+//
+// ASFX Toggles
+//
+
+/client/verb/toggle_asfx()
+ set name = "Toggle Ambience SFX"
set category = "Preferences"
set desc = "Toggles hearing ambient sound effects"
+
prefs.asfx_togs ^= ASFX_AMBIENCE
prefs.save_preferences()
if(prefs.asfx_togs & ASFX_AMBIENCE)
- to_chat(src, "You will now hear ambient sounds.")
+ to_chat(src, SPAN_INFO("You will now hear ambient sounds."))
else
- to_chat(src, "You will no longer hear ambient sounds.")
- src << sound(null, repeat = 0, wait = 0, volume = 0, channel = 1)
- src << sound(null, repeat = 0, wait = 0, volume = 0, channel = 2)
- feedback_add_details("admin_verb","TSFXAmbi") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+ to_chat(src, SPAN_INFO("You will no longer hear ambient sounds."))
+ src << sound(null, repeat = 0, wait = 0, volume = 0, channel = 1) // Ambience plays on channel 1.
+ feedback_add_details("admin_verb", "TSFXAmbi") // If you are copy pasting this, ensure the 2nd parameter is unique to the new proc.
-/client/proc/Toggle_footsteps()
- set name = "Hear/Silence Footsteps"
- set category = "SoundFx Prefs"
+/client/verb/toggle_asfx_hum(var/mob/living/L)
+ set name = "Toggle Ambient Hum SFX"
+ set category = "Preferences"
+ set desc = "Toggles hearing the ambient hum sound effect"
+
+ prefs.asfx_togs ^= ASFX_HUM
+ prefs.save_preferences()
+ if(prefs.asfx_togs & ASFX_HUM)
+ to_chat(src, SPAN_INFO("You will now hear the ambient hum sound."))
+ else
+ to_chat(src, SPAN_INFO("You will no longer hear the ambient hum sound."))
+ src << sound(null, repeat = 0, wait = 0, volume = 0, channel = 2) // Ambient hum plays on channel 2.
+ L.client.ambient_hum_playing = FALSE
+ feedback_add_details("admin_verb", "TSFXHum")
+
+//
+// SFX Toggles
+//
+
+/client/proc/toggle_footsteps()
+ set name = "Toggle Footsteps SFX"
+ set category = "SFX Preferences"
set desc = "Toggles hearing footstep sound effects"
prefs.asfx_togs ^= ASFX_FOOTSTEPS
prefs.save_preferences()
- if(prefs.asfx_togs & ASFX_FOOTSTEPS)
- to_chat(src, "You will now hear footstep sounds.")
- else
- to_chat(src, "You will no longer hear footstep sounds.")
- feedback_add_details("admin_verb","TSFXFS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+ to_chat(src, SPAN_INFO("You will [(prefs.asfx_togs & ASFX_FOOTSTEPS) ? "now" : "no longer"] hear footstep sounds."))
-/client/proc/Toggle_asfx_vote()
- set name = "Hear/Silence Vote Alarm"
- set category = "SoundFx Prefs"
+/client/proc/toggle_asfx_vote()
+ set name = "Toggle Vote Alarm SFX"
+ set category = "SFX Preferences"
set desc = "Toggles hearing of the vote alarm"
+
prefs.asfx_togs ^= ASFX_VOTE
prefs.save_preferences()
- if(prefs.asfx_togs & ASFX_VOTE)
- to_chat(src, "You will now hear the vote alarm.")
- else
- to_chat(src, "You will no longer hear the vote alarm.")
- feedback_add_details("admin_verb","TSFXFV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+ to_chat(src, SPAN_INFO("You will [(prefs.asfx_togs & ASFX_VOTE) ? "now" : "no longer"] hear the vote alarm."))
-/client/proc/Toggle_messagesounds()
+/client/proc/toggle_messagesounds()
set name = "Toggle Message SFX"
- set category = "SoundFx Prefs"
- set desc = "Toggles the message sounds."
+ set category = "SFX Preferences"
+ set desc = "Toggles the message sounds"
prefs.asfx_togs ^= ASFX_VOX
prefs.save_preferences()
- to_chat(src, "You will [(prefs.asfx_togs & ASFX_VOX) ? "now" : "no longer"] hear chat voices.")
+ to_chat(src, SPAN_INFO("You will [(prefs.asfx_togs & ASFX_VOX) ? "now" : "no longer"] hear chat voices."))
-/client/proc/Toggle_dropsounds()
- set name = "Hear/Silence Drop Sounds"
- set category = "SoundFx Prefs"
+/client/proc/toggle_dropsounds()
+ set name = "Toggle Item Dropping SFX"
+ set category = "SFX Preferences"
set desc = "Toggles hearing dropping and throwing sound effects"
prefs.asfx_togs ^= ASFX_DROPSOUND
prefs.save_preferences()
- if(prefs.asfx_togs & ASFX_DROPSOUND)
- to_chat(src, "You will now hear dropping and throwing sounds.")
- else
- to_chat(src, "You will no longer hear dropping and throwing sounds.")
+ to_chat(src, SPAN_INFO("You will [(prefs.asfx_togs & ASFX_DROPSOUND) ? "now" : "no longer"] hear dropping and throwing sounds."))
-/client/proc/Toggle_arcadesounds()
+/client/proc/toggle_arcadesounds()
set name = "Toggle Arcade SFX"
- set category = "SoundFx Prefs"
- set desc = "Toggles hearing noises made by arcades."
+ set category = "SFX Preferences"
+ set desc = "Toggles hearing noises made by arcades"
prefs.asfx_togs ^= ASFX_ARCADE
prefs.save_preferences()
- if(prefs.asfx_togs & ASFX_ARCADE)
- to_chat(src, "You will now hear arcade sounds.")
- else
- to_chat(src, "You will no longer hear arcade sounds.")
+ to_chat(src, SPAN_INFO("You will [(prefs.asfx_togs & ASFX_ARCADE) ? "now" : "no longer"] hear arcade sounds."))
-/client/proc/Toggle_radiosounds()
+/client/proc/toggle_radiosounds()
set name = "Toggle Radio SFX"
- set category = "SoundFx Prefs"
- set desc = "Toggles hearing noises made by radios."
+ set category = "SFX Preferences"
+ set desc = "Toggles hearing noises made by radios"
prefs.asfx_togs ^= ASFX_RADIO
prefs.save_preferences()
- if(prefs.asfx_togs & ASFX_RADIO)
- to_chat(src, "You will now hear radio sounds.")
- else
- to_chat(src, "You will no longer hear radio sounds.")
+ to_chat(src, SPAN_INFO("You will [(prefs.asfx_togs & ASFX_RADIO) ? "now" : "no longer"] hear radio sounds."))
-/client/proc/Toggle_instrumentsounds()
+/client/proc/toggle_instrumentsounds()
set name = "Toggle Instrument SFX"
- set category = "SoundFx Prefs"
- set desc = "Toggles hearing noises made by instruments."
+ set category = "SFX Preferences"
+ set desc = "Toggles hearing noises made by instruments"
prefs.asfx_togs ^= ASFX_INSTRUMENT
prefs.save_preferences()
- if(prefs.asfx_togs & ASFX_INSTRUMENT)
- to_chat(src, "You will now hear instrument sounds.")
- else
- to_chat(src, "You will no longer hear instrument sounds.")
+ to_chat(src, SPAN_INFO("You will [(prefs.asfx_togs & ASFX_INSTRUMENT) ? "now" : "no longer"] hear instrument sounds."))
\ No newline at end of file
diff --git a/code/modules/client/preferences_toggles.dm b/code/modules/client/preferences_toggles.dm
index 84044210106..da319f6172e 100644
--- a/code/modules/client/preferences_toggles.dm
+++ b/code/modules/client/preferences_toggles.dm
@@ -110,7 +110,6 @@
to_chat(src, "You will [(prefs.toggles & CHAT_OOC) ? "now" : "no longer"] see messages on the OOC channel.")
feedback_add_details("admin_verb","TOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
-
/client/verb/listen_looc()
set name = "Show/Hide LOOC (All)"
set category = "Preferences"
@@ -145,21 +144,6 @@
to_chat(src, "You will [!(prefs.toggles & CHAT_NOICONS) ? "now" : "no longer"] see chat tag icons.")
feedback_add_details("admin_verb","TCTAG") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
-
-/client/verb/Toggle_Soundscape() //All new ambience should be added here so it works with this verb until someone better at things comes up with a fix that isn't awful
- set name = "Hear/Silence Ambience"
- set category = "Preferences"
- set desc = "Toggles hearing ambient sound effects"
- prefs.toggles ^= SOUND_AMBIENCE
- prefs.save_preferences()
- if(prefs.toggles & SOUND_AMBIENCE)
- to_chat(src, "You will now hear ambient sounds.")
- else
- to_chat(src, "You will no longer hear ambient sounds.")
- src << sound(null, repeat = 0, wait = 0, volume = 0, channel = 1)
- src << sound(null, repeat = 0, wait = 0, volume = 0, channel = 2)
- feedback_add_details("admin_verb","TAmbi") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
-
/client/verb/toggle_progress()
set name = "Show/Hide Progress Bars"
set category = "Preferences"
@@ -179,4 +163,4 @@
prefs.toggles_secondary ^= FLOATING_MESSAGES
prefs.save_preferences()
- to_chat(src, SPAN_NOTICE("Floating messages are now [prefs.toggles_secondary & FLOATING_MESSAGES ? "enabled" : "disabled"]."))
+ to_chat(src, SPAN_NOTICE("Floating messages are now [prefs.toggles_secondary & FLOATING_MESSAGES ? "enabled" : "disabled"]."))
\ No newline at end of file
diff --git a/code/modules/holodeck/HolodeckPrograms.dm b/code/modules/holodeck/HolodeckPrograms.dm
index b6523ae45b9..c68f26d731a 100644
--- a/code/modules/holodeck/HolodeckPrograms.dm
+++ b/code/modules/holodeck/HolodeckPrograms.dm
@@ -1,9 +1,7 @@
/datum/holodeck_program
var/target
var/list/ambience = null
- var/loop_ambience = TRUE
-/datum/holodeck_program/New(var/target, var/list/ambience = null, var/loop_ambience = TRUE)
+/datum/holodeck_program/New(var/target, var/list/ambience = null)
src.target = target
src.ambience = ambience
- src.loop_ambience = loop_ambience
diff --git a/code/modules/maps/planet_types/grass.dm b/code/modules/maps/planet_types/grass.dm
index 0dba7038484..6c4abd612ab 100644
--- a/code/modules/maps/planet_types/grass.dm
+++ b/code/modules/maps/planet_types/grass.dm
@@ -45,9 +45,8 @@
/area/exoplanet/grass/play_ambience(var/mob/living/L)
..()
- if(!L.ear_deaf && L.client && !L.client.ambience_playing)
- L.client.ambience_playing = 1
- L.playsound_to(get_turf(L),sound('sound/ambience/jungle.ogg', repeat = 1, wait = 0, volume = 25))
+ if(L && L.client && (L.client.prefs.asfx_togs & ASFX_AMBIENCE) && !L.ear_deaf)
+ L.playsound_to(get_turf(L),sound('sound/ambience/jungle.ogg', repeat = 1, wait = 0, volume = 25, channel = 1))
/datum/random_map/noise/exoplanet/grass
descriptor = "grass exoplanet"
diff --git a/code/modules/modular_computers/computers/modular_computer/core.dm b/code/modules/modular_computers/computers/modular_computer/core.dm
index 976ff26b10a..6da9fdbb16f 100644
--- a/code/modules/modular_computers/computers/modular_computer/core.dm
+++ b/code/modules/modular_computers/computers/modular_computer/core.dm
@@ -46,9 +46,9 @@
working = hard_drive && processor_unit && damage < broken_damage && computer_use_power()
check_update_ui_need()
- if(working && enabled && world.time > ambience_last_played + 30 SECONDS && prob(3))
- playsound(get_turf(src), /decl/sound_category/computerbeep_sound, 30, 1, 10, required_preferences = SOUND_AMBIENCE)
- ambience_last_played = world.time
+ if(!is_portable && working && enabled && world.time > ambience_last_played_time + 30 SECONDS && prob(3))
+ playsound(get_turf(src), /decl/sound_category/computerbeep_sound, 30, 1, 10, required_preferences = ASFX_AMBIENCE)
+ ambience_last_played_time = world.time
/obj/item/modular_computer/proc/get_preset_programs(preset_type)
for(var/datum/modular_computer_app_presets/prs in ntnet_global.available_software_presets)
diff --git a/code/modules/modular_computers/computers/modular_computer/variables.dm b/code/modules/modular_computers/computers/modular_computer/variables.dm
index e858c09b9e9..b0618d6222e 100644
--- a/code/modules/modular_computers/computers/modular_computer/variables.dm
+++ b/code/modules/modular_computers/computers/modular_computer/variables.dm
@@ -21,7 +21,7 @@
var/base_idle_power_usage = 5 // Power usage when the computer is idle and screen is off (currently only applies to laptops)
var/enrolled = 0 // Weather the computer is enrolled in the company device management or not. 0 - unconfigured 1 - enrolled (work device) 2 - unenrolled (private device)
var/_app_preset_type // Used for specifying the software preset of the console
- var/ambience_last_played // Last time sound was played
+ var/ambience_last_played_time // Last time sound was played
var/pAI_lock = FALSE // Toggles whether pAI can interact with the modular computer while installed in it
var/obj/item/card/id/registered_id = null // ID used for chat client registering
var/scan_mode = null // Mode used for health/reagent scanners
@@ -29,6 +29,7 @@
var/doorcode = "smindicate"
var/hidden = FALSE
var/initial_name
+ var/is_portable = FALSE // Used to prevent the ambient beeps from playing.
// Modular computers can run on various devices. Each DEVICE (Laptop, Console, Tablet,..)
// must have it's own DMI file. Icon states must be called exactly the same in all files, but may look differently
diff --git a/code/modules/modular_computers/computers/subtypes/dev_handheld.dm b/code/modules/modular_computers/computers/subtypes/dev_handheld.dm
index d9b6c55217f..ed92a533eb1 100644
--- a/code/modules/modular_computers/computers/subtypes/dev_handheld.dm
+++ b/code/modules/modular_computers/computers/subtypes/dev_handheld.dm
@@ -13,6 +13,7 @@
hardware_flag = PROGRAM_TABLET
max_hardware_size = 1
w_class = ITEMSIZE_SMALL
+ is_portable = TRUE
/obj/item/modular_computer/handheld/Initialize()
. = ..()
diff --git a/html/changelogs/ambience_tweaks.yml b/html/changelogs/ambience_tweaks.yml
new file mode 100644
index 00000000000..756edad6171
--- /dev/null
+++ b/html/changelogs/ambience_tweaks.yml
@@ -0,0 +1,6 @@
+author: SleepyGemmy
+
+delete-after: True
+
+changes:
+ - tweak: "Reworks and cleans up the ambience code. Seperates the ambience and ambient hum and makes the ambient hum its own SFX toggle."
\ No newline at end of file