mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Merge pull request #9705 from Verkister/shush
Adds area soundproofing for dorms.
This commit is contained in:
committed by
Chompstation Bot
parent
5fc9a7b4ba
commit
978372ac18
@@ -50,6 +50,7 @@
|
|||||||
var/turf/base_turf //The base turf type of the area, which can be used to override the z-level's base turf
|
var/turf/base_turf //The base turf type of the area, which can be used to override the z-level's base turf
|
||||||
var/forbid_events = FALSE // If true, random events will not start inside this area.
|
var/forbid_events = FALSE // If true, random events will not start inside this area.
|
||||||
var/no_spoilers = FALSE // If true, makes it much more difficult to see what is inside an area with things like mesons.
|
var/no_spoilers = FALSE // If true, makes it much more difficult to see what is inside an area with things like mesons.
|
||||||
|
var/soundproofed = FALSE // If true, blocks sounds from other areas and prevents hearers on other areas from hearing the sounds within.
|
||||||
|
|
||||||
/area/Initialize()
|
/area/Initialize()
|
||||||
. = ..()
|
. = ..()
|
||||||
@@ -379,9 +380,9 @@ var/list/mob/living/forced_ambiance_list = new
|
|||||||
// 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
|
// 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.is_preference_enabled(/datum/client_preference/play_ambiance)))
|
if(!(L && L.is_preference_enabled(/datum/client_preference/play_ambiance)))
|
||||||
return
|
return
|
||||||
|
|
||||||
var/volume_mod = L.get_preference_volume_channel(VOLUME_CHANNEL_AMBIENCE)
|
var/volume_mod = L.get_preference_volume_channel(VOLUME_CHANNEL_AMBIENCE)
|
||||||
|
|
||||||
// If we previously were in an area with force-played ambiance, stop it.
|
// If we previously were in an area with force-played ambiance, stop it.
|
||||||
if((L in forced_ambiance_list) && initial)
|
if((L in forced_ambiance_list) && initial)
|
||||||
L << sound(null, channel = CHANNEL_AMBIENCE_FORCED)
|
L << sound(null, channel = CHANNEL_AMBIENCE_FORCED)
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
var/turf/turf_source = get_turf(source)
|
var/turf/turf_source = get_turf(source)
|
||||||
|
var/area/area_source = turf_source.loc
|
||||||
|
|
||||||
//allocate a channel if necessary now so its the same for everyone
|
//allocate a channel if necessary now so its the same for everyone
|
||||||
channel = channel || open_sound_channel()
|
channel = channel || open_sound_channel()
|
||||||
@@ -19,6 +20,9 @@
|
|||||||
if(!M || !M.client)
|
if(!M || !M.client)
|
||||||
continue
|
continue
|
||||||
var/turf/T = get_turf(M)
|
var/turf/T = get_turf(M)
|
||||||
|
var/area/A = T.loc
|
||||||
|
if((A.soundproofed || area_source.soundproofed) && (A != area_source))
|
||||||
|
continue
|
||||||
var/distance = get_dist(T, turf_source)
|
var/distance = get_dist(T, turf_source)
|
||||||
|
|
||||||
if(distance <= maxdistance)
|
if(distance <= maxdistance)
|
||||||
|
|||||||
@@ -967,157 +967,200 @@
|
|||||||
name = "\improper Construction Dorm 1"
|
name = "\improper Construction Dorm 1"
|
||||||
icon_state = "Sleep"
|
icon_state = "Sleep"
|
||||||
flags = RAD_SHIELDED
|
flags = RAD_SHIELDED
|
||||||
|
soundproofed = TRUE
|
||||||
|
|
||||||
/area/crew_quarters/sleep/maintDorm2
|
/area/crew_quarters/sleep/maintDorm2
|
||||||
name = "\improper Construction Dorm 2"
|
name = "\improper Construction Dorm 2"
|
||||||
icon_state = "Sleep"
|
icon_state = "Sleep"
|
||||||
flags = RAD_SHIELDED
|
flags = RAD_SHIELDED
|
||||||
|
soundproofed = TRUE
|
||||||
|
|
||||||
/area/crew_quarters/sleep/maintDorm3
|
/area/crew_quarters/sleep/maintDorm3
|
||||||
name = "\improper Construction Dorm 3"
|
name = "\improper Construction Dorm 3"
|
||||||
icon_state = "Sleep"
|
icon_state = "Sleep"
|
||||||
flags = RAD_SHIELDED
|
flags = RAD_SHIELDED
|
||||||
|
soundproofed = TRUE
|
||||||
|
|
||||||
/area/crew_quarters/sleep/maintDorm4
|
/area/crew_quarters/sleep/maintDorm4
|
||||||
name = "\improper Construction Dorm 4"
|
name = "\improper Construction Dorm 4"
|
||||||
icon_state = "Sleep"
|
icon_state = "Sleep"
|
||||||
flags = RAD_SHIELDED
|
flags = RAD_SHIELDED
|
||||||
|
soundproofed = TRUE
|
||||||
|
|
||||||
//TFF 28/8/19 - cleanup of areas placement
|
//TFF 28/8/19 - cleanup of areas placement
|
||||||
/area/crew_quarters/sleep/vistor_room_1
|
/area/crew_quarters/sleep/vistor_room_1
|
||||||
flags = RAD_SHIELDED | BLUE_SHIELDED
|
flags = RAD_SHIELDED | BLUE_SHIELDED
|
||||||
|
soundproofed = TRUE
|
||||||
|
|
||||||
/area/crew_quarters/sleep/vistor_room_2
|
/area/crew_quarters/sleep/vistor_room_2
|
||||||
flags = RAD_SHIELDED | BLUE_SHIELDED
|
flags = RAD_SHIELDED | BLUE_SHIELDED
|
||||||
|
soundproofed = TRUE
|
||||||
|
|
||||||
/area/crew_quarters/sleep/vistor_room_3
|
/area/crew_quarters/sleep/vistor_room_3
|
||||||
flags = RAD_SHIELDED | BLUE_SHIELDED
|
flags = RAD_SHIELDED | BLUE_SHIELDED
|
||||||
|
soundproofed = TRUE
|
||||||
|
|
||||||
/area/crew_quarters/sleep/vistor_room_4
|
/area/crew_quarters/sleep/vistor_room_4
|
||||||
flags = RAD_SHIELDED | BLUE_SHIELDED
|
flags = RAD_SHIELDED | BLUE_SHIELDED
|
||||||
|
soundproofed = TRUE
|
||||||
|
|
||||||
/area/crew_quarters/sleep/vistor_room_5
|
/area/crew_quarters/sleep/vistor_room_5
|
||||||
flags = RAD_SHIELDED | BLUE_SHIELDED
|
flags = RAD_SHIELDED | BLUE_SHIELDED
|
||||||
|
soundproofed = TRUE
|
||||||
|
|
||||||
/area/crew_quarters/sleep/vistor_room_6
|
/area/crew_quarters/sleep/vistor_room_6
|
||||||
flags = RAD_SHIELDED | BLUE_SHIELDED
|
flags = RAD_SHIELDED | BLUE_SHIELDED
|
||||||
|
soundproofed = TRUE
|
||||||
|
|
||||||
/area/crew_quarters/sleep/vistor_room_7
|
/area/crew_quarters/sleep/vistor_room_7
|
||||||
flags = RAD_SHIELDED | BLUE_SHIELDED
|
flags = RAD_SHIELDED | BLUE_SHIELDED
|
||||||
|
soundproofed = TRUE
|
||||||
|
|
||||||
/area/crew_quarters/sleep/vistor_room_8
|
/area/crew_quarters/sleep/vistor_room_8
|
||||||
flags = RAD_SHIELDED | BLUE_SHIELDED
|
flags = RAD_SHIELDED | BLUE_SHIELDED
|
||||||
|
soundproofed = TRUE
|
||||||
|
|
||||||
/area/crew_quarters/sleep/vistor_room_9
|
/area/crew_quarters/sleep/vistor_room_9
|
||||||
flags = RAD_SHIELDED | BLUE_SHIELDED
|
flags = RAD_SHIELDED | BLUE_SHIELDED
|
||||||
|
soundproofed = TRUE
|
||||||
|
|
||||||
/area/crew_quarters/sleep/vistor_room_10
|
/area/crew_quarters/sleep/vistor_room_10
|
||||||
flags = RAD_SHIELDED | BLUE_SHIELDED
|
flags = RAD_SHIELDED | BLUE_SHIELDED
|
||||||
|
soundproofed = TRUE
|
||||||
|
|
||||||
/area/crew_quarters/sleep/vistor_room_11
|
/area/crew_quarters/sleep/vistor_room_11
|
||||||
flags = RAD_SHIELDED | BLUE_SHIELDED
|
flags = RAD_SHIELDED | BLUE_SHIELDED
|
||||||
|
soundproofed = TRUE
|
||||||
|
|
||||||
/area/crew_quarters/sleep/vistor_room_12
|
/area/crew_quarters/sleep/vistor_room_12
|
||||||
flags = RAD_SHIELDED | BLUE_SHIELDED
|
flags = RAD_SHIELDED | BLUE_SHIELDED
|
||||||
|
soundproofed = TRUE
|
||||||
|
|
||||||
/area/crew_quarters/sleep/Dorm_1
|
/area/crew_quarters/sleep/Dorm_1
|
||||||
flags = RAD_SHIELDED | BLUE_SHIELDED
|
flags = RAD_SHIELDED | BLUE_SHIELDED
|
||||||
|
soundproofed = TRUE
|
||||||
|
|
||||||
/area/crew_quarters/sleep/Dorm_2
|
/area/crew_quarters/sleep/Dorm_2
|
||||||
flags = RAD_SHIELDED | BLUE_SHIELDED
|
flags = RAD_SHIELDED | BLUE_SHIELDED
|
||||||
|
soundproofed = TRUE
|
||||||
|
|
||||||
/area/crew_quarters/sleep/Dorm_3
|
/area/crew_quarters/sleep/Dorm_3
|
||||||
flags = RAD_SHIELDED | BLUE_SHIELDED
|
flags = RAD_SHIELDED | BLUE_SHIELDED
|
||||||
|
soundproofed = TRUE
|
||||||
|
|
||||||
/area/crew_quarters/sleep/Dorm_4
|
/area/crew_quarters/sleep/Dorm_4
|
||||||
flags = RAD_SHIELDED | BLUE_SHIELDED
|
flags = RAD_SHIELDED | BLUE_SHIELDED
|
||||||
|
soundproofed = TRUE
|
||||||
|
|
||||||
/area/crew_quarters/sleep/Dorm_5
|
/area/crew_quarters/sleep/Dorm_5
|
||||||
flags = RAD_SHIELDED | BLUE_SHIELDED
|
flags = RAD_SHIELDED | BLUE_SHIELDED
|
||||||
|
soundproofed = TRUE
|
||||||
|
|
||||||
/area/crew_quarters/sleep/Dorm_6
|
/area/crew_quarters/sleep/Dorm_6
|
||||||
flags = RAD_SHIELDED | BLUE_SHIELDED
|
flags = RAD_SHIELDED | BLUE_SHIELDED
|
||||||
|
soundproofed = TRUE
|
||||||
|
|
||||||
/area/crew_quarters/sleep/Dorm_7
|
/area/crew_quarters/sleep/Dorm_7
|
||||||
flags = RAD_SHIELDED | BLUE_SHIELDED
|
flags = RAD_SHIELDED | BLUE_SHIELDED
|
||||||
|
soundproofed = TRUE
|
||||||
|
|
||||||
/area/crew_quarters/sleep/Dorm_8
|
/area/crew_quarters/sleep/Dorm_8
|
||||||
flags = RAD_SHIELDED | BLUE_SHIELDED
|
flags = RAD_SHIELDED | BLUE_SHIELDED
|
||||||
|
soundproofed = TRUE
|
||||||
|
|
||||||
/area/crew_quarters/sleep/Dorm_9
|
/area/crew_quarters/sleep/Dorm_9
|
||||||
flags = RAD_SHIELDED | BLUE_SHIELDED
|
flags = RAD_SHIELDED | BLUE_SHIELDED
|
||||||
|
soundproofed = TRUE
|
||||||
|
|
||||||
/area/crew_quarters/sleep/Dorm_10
|
/area/crew_quarters/sleep/Dorm_10
|
||||||
flags = RAD_SHIELDED | BLUE_SHIELDED
|
flags = RAD_SHIELDED | BLUE_SHIELDED
|
||||||
|
soundproofed = TRUE
|
||||||
|
|
||||||
/area/crew_quarters/sleep/Dorm_1/holo
|
/area/crew_quarters/sleep/Dorm_1/holo
|
||||||
name = "\improper Dorm 1 Holodeck"
|
name = "\improper Dorm 1 Holodeck"
|
||||||
icon_state = "dk_yellow"
|
icon_state = "dk_yellow"
|
||||||
flags = RAD_SHIELDED | BLUE_SHIELDED
|
flags = RAD_SHIELDED | BLUE_SHIELDED
|
||||||
|
soundproofed = TRUE
|
||||||
|
|
||||||
/area/crew_quarters/sleep/Dorm_3/holo
|
/area/crew_quarters/sleep/Dorm_3/holo
|
||||||
name = "\improper Dorm 3 Holodeck"
|
name = "\improper Dorm 3 Holodeck"
|
||||||
icon_state = "dk_yellow"
|
icon_state = "dk_yellow"
|
||||||
flags = RAD_SHIELDED | BLUE_SHIELDED
|
flags = RAD_SHIELDED | BLUE_SHIELDED
|
||||||
|
soundproofed = TRUE
|
||||||
|
|
||||||
/area/crew_quarters/sleep/Dorm_5/holo
|
/area/crew_quarters/sleep/Dorm_5/holo
|
||||||
name = "\improper Dorm 5 Holodeck"
|
name = "\improper Dorm 5 Holodeck"
|
||||||
icon_state = "dk_yellow"
|
icon_state = "dk_yellow"
|
||||||
flags = RAD_SHIELDED | BLUE_SHIELDED
|
flags = RAD_SHIELDED | BLUE_SHIELDED
|
||||||
|
soundproofed = TRUE
|
||||||
|
|
||||||
/area/crew_quarters/sleep/Dorm_7/holo
|
/area/crew_quarters/sleep/Dorm_7/holo
|
||||||
name = "\improper Dorm 7 Holodeck"
|
name = "\improper Dorm 7 Holodeck"
|
||||||
icon_state = "dk_yellow"
|
icon_state = "dk_yellow"
|
||||||
flags = RAD_SHIELDED | BLUE_SHIELDED
|
flags = RAD_SHIELDED | BLUE_SHIELDED
|
||||||
|
soundproofed = TRUE
|
||||||
|
|
||||||
/area/crew_quarters/sleep/spacedorm1
|
/area/crew_quarters/sleep/spacedorm1
|
||||||
name = "\improper Visitor Lodging 1"
|
name = "\improper Visitor Lodging 1"
|
||||||
icon_state = "dk_yellow"
|
icon_state = "dk_yellow"
|
||||||
lightswitch = 0
|
lightswitch = 0
|
||||||
flags = RAD_SHIELDED | BLUE_SHIELDED
|
flags = RAD_SHIELDED | BLUE_SHIELDED
|
||||||
|
soundproofed = TRUE
|
||||||
/area/crew_quarters/sleep/spacedorm2
|
/area/crew_quarters/sleep/spacedorm2
|
||||||
name = "\improper Visitor Lodging 2"
|
name = "\improper Visitor Lodging 2"
|
||||||
icon_state = "dk_yellow"
|
icon_state = "dk_yellow"
|
||||||
lightswitch = 0
|
lightswitch = 0
|
||||||
flags = RAD_SHIELDED | BLUE_SHIELDED
|
flags = RAD_SHIELDED | BLUE_SHIELDED
|
||||||
|
soundproofed = TRUE
|
||||||
/area/crew_quarters/sleep/spacedorm3
|
/area/crew_quarters/sleep/spacedorm3
|
||||||
name = "\improper Visitor Lodging 3"
|
name = "\improper Visitor Lodging 3"
|
||||||
icon_state = "dk_yellow"
|
icon_state = "dk_yellow"
|
||||||
lightswitch = 0
|
lightswitch = 0
|
||||||
flags = RAD_SHIELDED | BLUE_SHIELDED
|
flags = RAD_SHIELDED | BLUE_SHIELDED
|
||||||
|
soundproofed = TRUE
|
||||||
/area/crew_quarters/sleep/spacedorm4
|
/area/crew_quarters/sleep/spacedorm4
|
||||||
name = "\improper Visitor Lodging 4"
|
name = "\improper Visitor Lodging 4"
|
||||||
icon_state = "dk_yellow"
|
icon_state = "dk_yellow"
|
||||||
lightswitch = 0
|
lightswitch = 0
|
||||||
flags = RAD_SHIELDED | BLUE_SHIELDED
|
flags = RAD_SHIELDED | BLUE_SHIELDED
|
||||||
|
soundproofed = TRUE
|
||||||
|
|
||||||
/area/holodeck/holodorm/source_basic
|
/area/holodeck/holodorm/source_basic
|
||||||
name = "\improper Holodeck Source"
|
name = "\improper Holodeck Source"
|
||||||
flags = RAD_SHIELDED | BLUE_SHIELDED
|
flags = RAD_SHIELDED | BLUE_SHIELDED
|
||||||
|
soundproofed = TRUE
|
||||||
/area/holodeck/holodorm/source_desert
|
/area/holodeck/holodorm/source_desert
|
||||||
name = "\improper Holodeck Source"
|
name = "\improper Holodeck Source"
|
||||||
flags = RAD_SHIELDED | BLUE_SHIELDED
|
flags = RAD_SHIELDED | BLUE_SHIELDED
|
||||||
|
soundproofed = TRUE
|
||||||
/area/holodeck/holodorm/source_seating
|
/area/holodeck/holodorm/source_seating
|
||||||
name = "\improper Holodeck Source"
|
name = "\improper Holodeck Source"
|
||||||
flags = RAD_SHIELDED | BLUE_SHIELDED
|
flags = RAD_SHIELDED | BLUE_SHIELDED
|
||||||
|
soundproofed = TRUE
|
||||||
/area/holodeck/holodorm/source_beach
|
/area/holodeck/holodorm/source_beach
|
||||||
name = "\improper Holodeck Source"
|
name = "\improper Holodeck Source"
|
||||||
flags = RAD_SHIELDED | BLUE_SHIELDED
|
flags = RAD_SHIELDED | BLUE_SHIELDED
|
||||||
|
soundproofed = TRUE
|
||||||
/area/holodeck/holodorm/source_garden
|
/area/holodeck/holodorm/source_garden
|
||||||
name = "\improper Holodeck Source"
|
name = "\improper Holodeck Source"
|
||||||
flags = RAD_SHIELDED | BLUE_SHIELDED
|
flags = RAD_SHIELDED | BLUE_SHIELDED
|
||||||
|
soundproofed = TRUE
|
||||||
/area/holodeck/holodorm/source_boxing
|
/area/holodeck/holodorm/source_boxing
|
||||||
name = "\improper Holodeck Source"
|
name = "\improper Holodeck Source"
|
||||||
flags = RAD_SHIELDED | BLUE_SHIELDED
|
flags = RAD_SHIELDED | BLUE_SHIELDED
|
||||||
|
soundproofed = TRUE
|
||||||
/area/holodeck/holodorm/source_snow
|
/area/holodeck/holodorm/source_snow
|
||||||
name = "\improper Holodeck Source"
|
name = "\improper Holodeck Source"
|
||||||
flags = RAD_SHIELDED | BLUE_SHIELDED
|
flags = RAD_SHIELDED | BLUE_SHIELDED
|
||||||
|
soundproofed = TRUE
|
||||||
/area/holodeck/holodorm/source_space
|
/area/holodeck/holodorm/source_space
|
||||||
name = "\improper Holodeck Source"
|
name = "\improper Holodeck Source"
|
||||||
flags = RAD_SHIELDED | BLUE_SHIELDED
|
flags = RAD_SHIELDED | BLUE_SHIELDED
|
||||||
|
soundproofed = TRUE
|
||||||
/area/holodeck/holodorm/source_off
|
/area/holodeck/holodorm/source_off
|
||||||
name = "\improper Holodeck Source"
|
name = "\improper Holodeck Source"
|
||||||
flags = RAD_SHIELDED | BLUE_SHIELDED
|
flags = RAD_SHIELDED | BLUE_SHIELDED
|
||||||
|
soundproofed = TRUE
|
||||||
|
|
||||||
/area/ai_core_foyer
|
/area/ai_core_foyer
|
||||||
name = "\improper AI Core Access"
|
name = "\improper AI Core Access"
|
||||||
|
|||||||
Reference in New Issue
Block a user