[Performance] Refactors ambient sounds to use global lists instead of list macros (#55988)

What it says on the tin really. If we want to be precise it changes how ambient sounds by giving areas an index define and then checks if they don't have a custom ambient sounds list if they don't then it applies the correct global list to ambientsounds
This commit is contained in:
spessbro
2021-01-07 17:24:57 -05:00
committed by GitHub
parent 0d60b4e458
commit a2a3d25dd4
13 changed files with 158 additions and 97 deletions

View File

@@ -28,70 +28,25 @@
#define SOUND_MINIMUM_PRESSURE 10 #define SOUND_MINIMUM_PRESSURE 10
//Ambience types
#define GENERIC list('sound/ambience/ambigen1.ogg','sound/ambience/ambigen3.ogg',\
'sound/ambience/ambigen4.ogg','sound/ambience/ambigen5.ogg',\
'sound/ambience/ambigen6.ogg','sound/ambience/ambigen7.ogg',\
'sound/ambience/ambigen8.ogg','sound/ambience/ambigen9.ogg',\
'sound/ambience/ambigen10.ogg','sound/ambience/ambigen11.ogg',\
'sound/ambience/ambigen12.ogg','sound/ambience/ambigen14.ogg','sound/ambience/ambigen15.ogg')
#define HOLY list('sound/ambience/ambicha1.ogg','sound/ambience/ambicha2.ogg','sound/ambience/ambicha3.ogg',\
'sound/ambience/ambicha4.ogg', 'sound/ambience/ambiholy.ogg', 'sound/ambience/ambiholy2.ogg',\
'sound/ambience/ambiholy3.ogg')
#define HIGHSEC list('sound/ambience/ambidanger.ogg', 'sound/ambience/ambidanger2.ogg')
#define RUINS list('sound/ambience/ambimine.ogg', 'sound/ambience/ambicave.ogg', 'sound/ambience/ambiruin.ogg',\
'sound/ambience/ambiruin2.ogg', 'sound/ambience/ambiruin3.ogg', 'sound/ambience/ambiruin4.ogg',\
'sound/ambience/ambiruin5.ogg', 'sound/ambience/ambiruin6.ogg', 'sound/ambience/ambiruin7.ogg',\
'sound/ambience/ambidanger.ogg', 'sound/ambience/ambidanger2.ogg', 'sound/ambience/ambitech3.ogg',\
'sound/ambience/ambimystery.ogg', 'sound/ambience/ambimaint1.ogg')
#define ENGINEERING list('sound/ambience/ambisin1.ogg','sound/ambience/ambisin2.ogg','sound/ambience/ambisin3.ogg','sound/ambience/ambisin4.ogg',\
'sound/ambience/ambiatmos.ogg', 'sound/ambience/ambiatmos2.ogg', 'sound/ambience/ambitech.ogg', 'sound/ambience/ambitech2.ogg', 'sound/ambience/ambitech3.ogg')
#define MINING list('sound/ambience/ambimine.ogg', 'sound/ambience/ambicave.ogg', 'sound/ambience/ambiruin.ogg',\
'sound/ambience/ambiruin2.ogg', 'sound/ambience/ambiruin3.ogg', 'sound/ambience/ambiruin4.ogg',\
'sound/ambience/ambiruin5.ogg', 'sound/ambience/ambiruin6.ogg', 'sound/ambience/ambiruin7.ogg',\
'sound/ambience/ambidanger.ogg', 'sound/ambience/ambidanger2.ogg', 'sound/ambience/ambimaint1.ogg',\
'sound/ambience/ambilava1.ogg', 'sound/ambience/ambilava2.ogg', 'sound/ambience/ambilava3.ogg')
#define MEDICAL list('sound/ambience/ambinice.ogg')
#define SPOOKY list('sound/ambience/ambimo1.ogg','sound/ambience/ambimo2.ogg','sound/ambience/ambiruin7.ogg','sound/ambience/ambiruin6.ogg',\
'sound/ambience/ambiodd.ogg', 'sound/ambience/ambimystery.ogg')
#define SPACE list('sound/ambience/ambispace.ogg', 'sound/ambience/ambispace2.ogg', 'sound/ambience/title2.ogg', 'sound/ambience/ambiatmos.ogg')
#define MAINTENANCE list('sound/ambience/ambimaint1.ogg', 'sound/ambience/ambimaint2.ogg', 'sound/ambience/ambimaint3.ogg', 'sound/ambience/ambimaint4.ogg',\
'sound/ambience/ambimaint5.ogg', 'sound/voice/lowHiss2.ogg', 'sound/voice/lowHiss3.ogg', 'sound/voice/lowHiss4.ogg', 'sound/ambience/ambitech2.ogg' )
#define AWAY_MISSION list('sound/ambience/ambitech.ogg', 'sound/ambience/ambitech2.ogg', 'sound/ambience/ambiruin.ogg',\
'sound/ambience/ambiruin2.ogg', 'sound/ambience/ambiruin3.ogg', 'sound/ambience/ambiruin4.ogg',\
'sound/ambience/ambiruin5.ogg', 'sound/ambience/ambiruin6.ogg', 'sound/ambience/ambiruin7.ogg',\
'sound/ambience/ambidanger.ogg', 'sound/ambience/ambidanger2.ogg', 'sound/ambience/ambimaint.ogg',\
'sound/ambience/ambiatmos.ogg', 'sound/ambience/ambiatmos2.ogg', 'sound/ambience/ambiodd.ogg')
#define REEBE list('sound/ambience/ambireebe1.ogg', 'sound/ambience/ambireebe2.ogg', 'sound/ambience/ambireebe3.ogg')
#define CREEPY_SOUNDS list('sound/effects/ghost.ogg', 'sound/effects/ghost2.ogg', 'sound/effects/heart_beat.ogg', 'sound/effects/screech.ogg',\
'sound/hallucinations/behind_you1.ogg', 'sound/hallucinations/behind_you2.ogg', 'sound/hallucinations/far_noise.ogg', 'sound/hallucinations/growl1.ogg', 'sound/hallucinations/growl2.ogg',\
'sound/hallucinations/growl3.ogg', 'sound/hallucinations/im_here1.ogg', 'sound/hallucinations/im_here2.ogg', 'sound/hallucinations/i_see_you1.ogg', 'sound/hallucinations/i_see_you2.ogg',\
'sound/hallucinations/look_up1.ogg', 'sound/hallucinations/look_up2.ogg', 'sound/hallucinations/over_here1.ogg', 'sound/hallucinations/over_here2.ogg', 'sound/hallucinations/over_here3.ogg',\
'sound/hallucinations/turn_around1.ogg', 'sound/hallucinations/turn_around2.ogg', 'sound/hallucinations/veryfar_noise.ogg', 'sound/hallucinations/wail.ogg')
#define INTERACTION_SOUND_RANGE_MODIFIER -3 #define INTERACTION_SOUND_RANGE_MODIFIER -3
#define EQUIP_SOUND_VOLUME 30 #define EQUIP_SOUND_VOLUME 30
#define PICKUP_SOUND_VOLUME 15 #define PICKUP_SOUND_VOLUME 15
#define DROP_SOUND_VOLUME 20 #define DROP_SOUND_VOLUME 20
#define YEET_SOUND_VOLUME 90 #define YEET_SOUND_VOLUME 90
#define AMBIENCE_GENERIC "generic"
#define AMBIENCE_HOLY "holy"
#define AMBIENCE_DANGER "danger"
#define AMBIENCE_RUINS "ruins"
#define AMBIENCE_ENGI "engi"
#define AMBIENCE_MINING "mining"
#define AMBIENCE_MEDICAL "med"
#define AMBIENCE_SPOOKY "spooky"
#define AMBIENCE_SPACE "space"
#define AMBIENCE_MAINT "maint"
#define AMBIENCE_AWAY "away"
#define AMBIENCE_REEBE "reebe" //unused
#define AMBIENCE_CREEPY "creepy" //not to be confused with spooky
//default byond sound environments //default byond sound environments
#define SOUND_ENVIRONMENT_NONE -1 #define SOUND_ENVIRONMENT_NONE -1

View File

@@ -0,0 +1,102 @@
GLOBAL_LIST_INIT(generic_ambience,list(
'sound/ambience/ambigen1.ogg', 'sound/ambience/ambigen3.ogg',
'sound/ambience/ambigen4.ogg', 'sound/ambience/ambigen5.ogg',
'sound/ambience/ambigen6.ogg', 'sound/ambience/ambigen7.ogg',
'sound/ambience/ambigen8.ogg', 'sound/ambience/ambigen9.ogg',
'sound/ambience/ambigen10.ogg', 'sound/ambience/ambigen11.ogg',
'sound/ambience/ambigen12.ogg', 'sound/ambience/ambigen14.ogg',
'sound/ambience/ambigen15.ogg'))
GLOBAL_LIST_INIT(holy_ambience,list(
'sound/ambience/ambicha1.ogg', 'sound/ambience/ambicha2.ogg',
'sound/ambience/ambicha3.ogg', 'sound/ambience/ambicha4.ogg',
'sound/ambience/ambiholy.ogg', 'sound/ambience/ambiholy2.ogg',
'sound/ambience/ambiholy3.ogg'))
GLOBAL_LIST_INIT(danger_ambience,list(
'sound/ambience/ambidanger.ogg', 'sound/ambience/ambidanger2.ogg'))
GLOBAL_LIST_INIT(ruins_ambience,list(
'sound/ambience/ambimine.ogg', 'sound/ambience/ambicave.ogg',
'sound/ambience/ambiruin.ogg', 'sound/ambience/ambiruin2.ogg',
'sound/ambience/ambiruin3.ogg', 'sound/ambience/ambiruin4.ogg',
'sound/ambience/ambiruin5.ogg', 'sound/ambience/ambiruin6.ogg',
'sound/ambience/ambiruin7.ogg', 'sound/ambience/ambidanger.ogg',
'sound/ambience/ambidanger2.ogg', 'sound/ambience/ambitech3.ogg',
'sound/ambience/ambimystery.ogg', 'sound/ambience/ambimaint1.ogg'))
GLOBAL_LIST_INIT(engi_ambience,list(
'sound/ambience/ambisin1.ogg', 'sound/ambience/ambisin2.ogg',
'sound/ambience/ambisin3.ogg', 'sound/ambience/ambisin4.ogg',
'sound/ambience/ambiatmos.ogg', 'sound/ambience/ambiatmos2.ogg',
'sound/ambience/ambitech.ogg', 'sound/ambience/ambitech2.ogg',
'sound/ambience/ambitech3.ogg'))
GLOBAL_LIST_INIT(mining_ambience,list(
'sound/ambience/ambimine.ogg', 'sound/ambience/ambicave.ogg',
'sound/ambience/ambiruin.ogg', 'sound/ambience/ambiruin2.ogg',
'sound/ambience/ambiruin3.ogg', 'sound/ambience/ambiruin4.ogg',
'sound/ambience/ambiruin5.ogg', 'sound/ambience/ambiruin6.ogg',
'sound/ambience/ambiruin7.ogg', 'sound/ambience/ambidanger.ogg',
'sound/ambience/ambidanger2.ogg', 'sound/ambience/ambimaint1.ogg',
'sound/ambience/ambilava1.ogg', 'sound/ambience/ambilava2.ogg',
'sound/ambience/ambilava3.ogg'))
GLOBAL_LIST_INIT(medical_ambience,list('sound/ambience/ambinice.ogg'))
GLOBAL_LIST_INIT(spooky_ambience,list(
'sound/ambience/ambimo1.ogg', 'sound/ambience/ambimo2.ogg',
'sound/ambience/ambiruin7.ogg', 'sound/ambience/ambiruin6.ogg',
'sound/ambience/ambiodd.ogg', 'sound/ambience/ambimystery.ogg'))
GLOBAL_LIST_INIT(space_ambience,list(
'sound/ambience/ambispace.ogg', 'sound/ambience/ambispace2.ogg',
'sound/ambience/title2.ogg', 'sound/ambience/ambiatmos.ogg'))
GLOBAL_LIST_INIT(maint_ambience,list(
'sound/ambience/ambimaint1.ogg', 'sound/ambience/ambimaint2.ogg',
'sound/ambience/ambimaint3.ogg', 'sound/ambience/ambimaint4.ogg',
'sound/ambience/ambimaint5.ogg', 'sound/voice/lowHiss2.ogg',
'sound/voice/lowHiss3.ogg', 'sound/voice/lowHiss4.ogg',
'sound/ambience/ambitech2.ogg'))
GLOBAL_LIST_INIT(away_ambience,list(
'sound/ambience/ambitech.ogg', 'sound/ambience/ambitech2.ogg',
'sound/ambience/ambiruin.ogg', 'sound/ambience/ambiruin2.ogg',
'sound/ambience/ambiruin3.ogg', 'sound/ambience/ambiruin4.ogg',
'sound/ambience/ambiruin5.ogg', 'sound/ambience/ambiruin6.ogg',
'sound/ambience/ambiruin7.ogg', 'sound/ambience/ambidanger.ogg',
'sound/ambience/ambidanger2.ogg', 'sound/ambience/ambimaint.ogg',
'sound/ambience/ambiatmos.ogg', 'sound/ambience/ambiatmos2.ogg',
'sound/ambience/ambiodd.ogg'))
GLOBAL_LIST_INIT(reebe_ambience,list('sound/ambience/ambireebe1.ogg', 'sound/ambience/ambireebe2.ogg', 'sound/ambience/ambireebe3.ogg'))
GLOBAL_LIST_INIT(creepy_ambience,list(
'sound/effects/ghost.ogg', 'sound/effects/ghost2.ogg',
'sound/effects/heart_beat.ogg', 'sound/effects/screech.ogg',
'sound/hallucinations/behind_you1.ogg', 'sound/hallucinations/behind_you2.ogg',
'sound/hallucinations/far_noise.ogg', 'sound/hallucinations/growl1.ogg',
'sound/hallucinations/growl2.ogg', 'sound/hallucinations/growl3.ogg',
'sound/hallucinations/im_here1.ogg', 'sound/hallucinations/im_here2.ogg',
'sound/hallucinations/i_see_you1.ogg', 'sound/hallucinations/i_see_you2.ogg',
'sound/hallucinations/look_up1.ogg', 'sound/hallucinations/look_up2.ogg',
'sound/hallucinations/over_here1.ogg', 'sound/hallucinations/over_here2.ogg',
'sound/hallucinations/over_here3.ogg', 'sound/hallucinations/turn_around1.ogg',
'sound/hallucinations/turn_around2.ogg', 'sound/hallucinations/veryfar_noise.ogg',
'sound/hallucinations/wail.ogg'))
GLOBAL_LIST_INIT(ambience_assoc,list(
AMBIENCE_GENERIC = GLOB.generic_ambience,
AMBIENCE_HOLY = GLOB.holy_ambience,
AMBIENCE_DANGER = GLOB.danger_ambience,
AMBIENCE_RUINS = GLOB.ruins_ambience,
AMBIENCE_ENGI = GLOB.engi_ambience,
AMBIENCE_MINING = GLOB.mining_ambience,
AMBIENCE_MEDICAL = GLOB.medical_ambience,
AMBIENCE_SPOOKY = GLOB.spooky_ambience,
AMBIENCE_SPACE = GLOB.space_ambience,
AMBIENCE_MAINT = GLOB.maint_ambience,
AMBIENCE_AWAY = GLOB.away_ambience,
AMBIENCE_REEBE = GLOB.reebe_ambience,
AMBIENCE_CREEPY = GLOB.creepy_ambience))

View File

@@ -7,7 +7,8 @@
icon = 'ICON FILENAME' (defaults to 'icons/turf/areas.dmi') icon = 'ICON FILENAME' (defaults to 'icons/turf/areas.dmi')
icon_state = "NAME OF ICON" (defaults to "unknown" (blank)) icon_state = "NAME OF ICON" (defaults to "unknown" (blank))
requires_power = FALSE (defaults to true) requires_power = FALSE (defaults to true)
ambientsounds = list() (defaults to GENERIC from sound.dm. override it as "ambientsounds = list('sound/ambience/signal.ogg')" or using another define. ambience_index = AMBIENCE_GENERIC (picks the ambience from an assoc list in ambience.dm)
ambientsounds = list() (defaults to ambience_index's assoc on Initialize(). override it as "ambientsounds = list('sound/ambience/signal.ogg')" or by changing ambience_index)
NOTE: there are two lists of areas in the end of this file: centcom and station itself. Please maintain these lists valid. --rastaf0 NOTE: there are two lists of areas in the end of this file: centcom and station itself. Please maintain these lists valid. --rastaf0
@@ -30,7 +31,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
power_environ = FALSE power_environ = FALSE
area_flags = UNIQUE_AREA | NO_ALERTS area_flags = UNIQUE_AREA | NO_ALERTS
outdoors = TRUE outdoors = TRUE
ambientsounds = SPACE ambience_index = AMBIENCE_SPACE
flags_1 = CAN_BE_DIRTY_1 flags_1 = CAN_BE_DIRTY_1
sound_environment = SOUND_AREA_SPACE sound_environment = SOUND_AREA_SPACE
@@ -59,13 +60,13 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
requires_power = FALSE requires_power = FALSE
has_gravity = STANDARD_GRAVITY has_gravity = STANDARD_GRAVITY
area_flags = UNIQUE_AREA area_flags = UNIQUE_AREA
ambientsounds = MINING ambience_index = AMBIENCE_MINING
flags_1 = CAN_BE_DIRTY_1 flags_1 = CAN_BE_DIRTY_1
sound_environment = SOUND_AREA_ASTEROID sound_environment = SOUND_AREA_ASTEROID
/area/asteroid/nearstation /area/asteroid/nearstation
dynamic_lighting = DYNAMIC_LIGHTING_FORCED dynamic_lighting = DYNAMIC_LIGHTING_FORCED
ambientsounds = RUINS ambience_index = AMBIENCE_RUINS
always_unpowered = FALSE always_unpowered = FALSE
requires_power = TRUE requires_power = TRUE
area_flags = UNIQUE_AREA | BLOBS_ALLOWED area_flags = UNIQUE_AREA | BLOBS_ALLOWED
@@ -78,7 +79,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
//Maintenance //Maintenance
/area/maintenance /area/maintenance
ambientsounds = MAINTENANCE ambience_index = AMBIENCE_MAINT
area_flags = BLOBS_ALLOWED | UNIQUE_AREA area_flags = BLOBS_ALLOWED | UNIQUE_AREA
airlock_wires = /datum/wires/airlock/maint airlock_wires = /datum/wires/airlock/maint
sound_environment = SOUND_AREA_TUNNEL_ENCLOSED sound_environment = SOUND_AREA_TUNNEL_ENCLOSED
@@ -528,7 +529,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
/area/chapel /area/chapel
icon_state = "chapel" icon_state = "chapel"
ambientsounds = HOLY ambience_index = AMBIENCE_HOLY
flags_1 = NONE flags_1 = NONE
sound_environment = SOUND_AREA_LARGE_ENCLOSED sound_environment = SOUND_AREA_LARGE_ENCLOSED
@@ -563,7 +564,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
//Engineering //Engineering
/area/engine /area/engine
ambientsounds = ENGINEERING ambience_index = AMBIENCE_ENGI
airlock_wires = /datum/wires/airlock/engineering airlock_wires = /datum/wires/airlock/engineering
sound_environment = SOUND_AREA_LARGE_ENCLOSED sound_environment = SOUND_AREA_LARGE_ENCLOSED
@@ -637,7 +638,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
dynamic_lighting = DYNAMIC_LIGHTING_IFSTARLIGHT dynamic_lighting = DYNAMIC_LIGHTING_IFSTARLIGHT
area_flags = UNIQUE_AREA area_flags = UNIQUE_AREA
flags_1 = NONE flags_1 = NONE
ambientsounds = ENGINEERING ambience_index = AMBIENCE_ENGI
airlock_wires = /datum/wires/airlock/engineering airlock_wires = /datum/wires/airlock/engineering
sound_environment = SOUND_AREA_SPACE sound_environment = SOUND_AREA_SPACE
@@ -722,13 +723,13 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
/area/teleporter /area/teleporter
name = "Teleporter Room" name = "Teleporter Room"
icon_state = "teleporter" icon_state = "teleporter"
ambientsounds = ENGINEERING ambience_index = AMBIENCE_ENGI
airlock_wires = /datum/wires/airlock/command airlock_wires = /datum/wires/airlock/command
/area/gateway /area/gateway
name = "Gateway" name = "Gateway"
icon_state = "gateway" icon_state = "gateway"
ambientsounds = ENGINEERING ambience_index = AMBIENCE_ENGI
airlock_wires = /datum/wires/airlock/command airlock_wires = /datum/wires/airlock/command
sound_environment = SOUND_AREA_STANDARD_STATION sound_environment = SOUND_AREA_STANDARD_STATION
@@ -737,7 +738,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
/area/medical /area/medical
name = "Medical" name = "Medical"
icon_state = "medbay1" icon_state = "medbay1"
ambientsounds = MEDICAL ambience_index = AMBIENCE_MEDICAL
airlock_wires = /datum/wires/airlock/medbay airlock_wires = /datum/wires/airlock/medbay
sound_environment = SOUND_AREA_STANDARD_STATION sound_environment = SOUND_AREA_STANDARD_STATION
@@ -814,7 +815,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
/area/medical/morgue /area/medical/morgue
name = "Morgue" name = "Morgue"
icon_state = "morgue" icon_state = "morgue"
ambientsounds = SPOOKY ambience_index = AMBIENCE_SPOOKY
sound_environment = SOUND_AREA_SMALL_ENCLOSED sound_environment = SOUND_AREA_SMALL_ENCLOSED
/area/medical/chemistry /area/medical/chemistry
@@ -861,7 +862,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
/area/security /area/security
name = "Security" name = "Security"
icon_state = "security" icon_state = "security"
ambientsounds = HIGHSEC ambience_index = AMBIENCE_DANGER
airlock_wires = /datum/wires/airlock/security airlock_wires = /datum/wires/airlock/security
sound_environment = SOUND_AREA_STANDARD_STATION sound_environment = SOUND_AREA_STANDARD_STATION
@@ -1213,7 +1214,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
/area/construction /area/construction
name = "Construction Area" name = "Construction Area"
icon_state = "construction" icon_state = "construction"
ambientsounds = ENGINEERING ambience_index = AMBIENCE_ENGI
sound_environment = SOUND_AREA_STANDARD_STATION sound_environment = SOUND_AREA_STANDARD_STATION
/area/construction/mining/aux_base /area/construction/mining/aux_base
@@ -1229,7 +1230,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
/area/vacant_room /area/vacant_room
name = "Vacant Room" name = "Vacant Room"
icon_state = "vacant_room" icon_state = "vacant_room"
ambientsounds = MAINTENANCE ambience_index = AMBIENCE_MAINT
/area/vacant_room/office /area/vacant_room/office
name = "Vacant Office" name = "Vacant Office"
@@ -1247,7 +1248,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
/area/ai_monitored/security/armory /area/ai_monitored/security/armory
name = "Armory" name = "Armory"
icon_state = "armory" icon_state = "armory"
ambientsounds = HIGHSEC ambience_index = AMBIENCE_DANGER
airlock_wires = /datum/wires/airlock/security airlock_wires = /datum/wires/airlock/security
/area/ai_monitored/security/armory/upper /area/ai_monitored/security/armory/upper
@@ -1256,7 +1257,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
/area/ai_monitored/storage/eva /area/ai_monitored/storage/eva
name = "EVA Storage" name = "EVA Storage"
icon_state = "eva" icon_state = "eva"
ambientsounds = HIGHSEC ambience_index = AMBIENCE_DANGER
/area/ai_monitored/storage/eva/upper /area/ai_monitored/storage/eva/upper
name = "Upper EVA Storage" name = "Upper EVA Storage"
@@ -1264,7 +1265,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
/area/ai_monitored/storage/satellite /area/ai_monitored/storage/satellite
name = "AI Satellite Maint" name = "AI Satellite Maint"
icon_state = "ai_storage" icon_state = "ai_storage"
ambientsounds = HIGHSEC ambience_index = AMBIENCE_DANGER
airlock_wires = /datum/wires/airlock/ai airlock_wires = /datum/wires/airlock/ai
//Turret_protected //Turret_protected

View File

@@ -41,7 +41,7 @@
///Will objects this area be needing power? ///Will objects this area be needing power?
var/requires_power = TRUE var/requires_power = TRUE
/// This gets overridden to 1 for space in area/Initialize(). /// This gets overridden to 1 for space in area/.
var/always_unpowered = FALSE var/always_unpowered = FALSE
var/power_equip = TRUE var/power_equip = TRUE
@@ -52,7 +52,8 @@
var/parallax_movedir = 0 var/parallax_movedir = 0
var/list/ambientsounds = GENERIC var/ambience_index = AMBIENCE_GENERIC
var/list/ambientsounds
flags_1 = CAN_BE_DIRTY_1 | CULT_PERMITTED_1 flags_1 = CAN_BE_DIRTY_1 | CULT_PERMITTED_1
var/list/firedoors var/list/firedoors
@@ -134,7 +135,8 @@ GLOBAL_LIST_EMPTY(teleportlocs)
*/ */
/area/Initialize(mapload) /area/Initialize(mapload)
icon_state = "" icon_state = ""
if(!ambientsounds)
ambientsounds = GLOB.ambience_assoc[ambience_index]
if(requires_power) if(requires_power)
luminosity = 0 luminosity = 0
else else

View File

@@ -8,7 +8,7 @@ Unused icons for new areas are "awaycontent1" ~ "awaycontent30"
name = "Strange Location" name = "Strange Location"
icon_state = "away" icon_state = "away"
has_gravity = STANDARD_GRAVITY has_gravity = STANDARD_GRAVITY
ambientsounds = AWAY_MISSION ambience_index = AMBIENCE_AWAY
sound_environment = SOUND_ENVIRONMENT_ROOM sound_environment = SOUND_ENVIRONMENT_ROOM
/area/awaymission/beach /area/awaymission/beach

View File

@@ -145,7 +145,7 @@
has_gravity = STANDARD_GRAVITY has_gravity = STANDARD_GRAVITY
area_flags = VALID_TERRITORY | UNIQUE_AREA | NOTELEPORT area_flags = VALID_TERRITORY | UNIQUE_AREA | NOTELEPORT
flags_1 = NONE flags_1 = NONE
ambientsounds = HIGHSEC ambience_index = AMBIENCE_DANGER
network_root_id = SYNDICATE_NETWORK_ROOT network_root_id = SYNDICATE_NETWORK_ROOT
/area/syndicate_mothership/control /area/syndicate_mothership/control

View File

@@ -15,7 +15,7 @@
power_light = FALSE power_light = FALSE
outdoors = TRUE outdoors = TRUE
flags_1 = NONE flags_1 = NONE
ambientsounds = MINING ambience_index = AMBIENCE_MINING
area_flags = VALID_TERRITORY | UNIQUE_AREA | NO_ALERTS area_flags = VALID_TERRITORY | UNIQUE_AREA | NO_ALERTS
sound_environment = SOUND_AREA_STANDARD_STATION sound_environment = SOUND_AREA_STANDARD_STATION
@@ -29,7 +29,7 @@
power_light = FALSE power_light = FALSE
outdoors = TRUE outdoors = TRUE
flags_1 = NONE flags_1 = NONE
ambientsounds = MINING ambience_index = AMBIENCE_MINING
area_flags = VALID_TERRITORY | UNIQUE_AREA | FLORA_ALLOWED | CAVES_ALLOWED | NO_ALERTS area_flags = VALID_TERRITORY | UNIQUE_AREA | FLORA_ALLOWED | CAVES_ALLOWED | NO_ALERTS
/area/mine/lobby /area/mine/lobby
@@ -80,7 +80,7 @@
/area/mine/laborcamp/security /area/mine/laborcamp/security
name = "Labor Camp Security" name = "Labor Camp Security"
icon_state = "security" icon_state = "security"
ambientsounds = HIGHSEC ambience_index = AMBIENCE_DANGER
@@ -102,7 +102,7 @@
power_equip = FALSE power_equip = FALSE
power_light = FALSE power_light = FALSE
requires_power = TRUE requires_power = TRUE
ambientsounds = MINING ambience_index = AMBIENCE_MINING
area_flags = VALID_TERRITORY | UNIQUE_AREA | FLORA_ALLOWED | NO_ALERTS area_flags = VALID_TERRITORY | UNIQUE_AREA | FLORA_ALLOWED | NO_ALERTS
/area/lavaland/underground /area/lavaland/underground
@@ -113,7 +113,7 @@
power_environ = FALSE power_environ = FALSE
power_equip = FALSE power_equip = FALSE
power_light = FALSE power_light = FALSE
ambientsounds = MINING ambience_index = AMBIENCE_MINING
area_flags = VALID_TERRITORY | UNIQUE_AREA | FLORA_ALLOWED | NO_ALERTS area_flags = VALID_TERRITORY | UNIQUE_AREA | FLORA_ALLOWED | NO_ALERTS
@@ -153,7 +153,7 @@
power_equip = FALSE power_equip = FALSE
power_light = FALSE power_light = FALSE
requires_power = TRUE requires_power = TRUE
ambientsounds = MINING ambience_index = AMBIENCE_MINING
area_flags = UNIQUE_AREA | FLORA_ALLOWED | NO_ALERTS area_flags = UNIQUE_AREA | FLORA_ALLOWED | NO_ALERTS
/area/icemoon/surface/outdoors // weather happens here /area/icemoon/surface/outdoors // weather happens here
@@ -183,7 +183,7 @@
power_environ = FALSE power_environ = FALSE
power_equip = FALSE power_equip = FALSE
power_light = FALSE power_light = FALSE
ambientsounds = MINING ambience_index = AMBIENCE_MINING
area_flags = UNIQUE_AREA | FLORA_ALLOWED | NO_ALERTS area_flags = UNIQUE_AREA | FLORA_ALLOWED | NO_ALERTS
/area/icemoon/underground/unexplored // mobs and megafauna and ruins spawn here /area/icemoon/underground/unexplored // mobs and megafauna and ruins spawn here

View File

@@ -6,7 +6,7 @@
has_gravity = STANDARD_GRAVITY has_gravity = STANDARD_GRAVITY
area_flags = HIDDEN_AREA | BLOBS_ALLOWED | UNIQUE_AREA | NO_ALERTS area_flags = HIDDEN_AREA | BLOBS_ALLOWED | UNIQUE_AREA | NO_ALERTS
dynamic_lighting = DYNAMIC_LIGHTING_FORCED dynamic_lighting = DYNAMIC_LIGHTING_FORCED
ambientsounds = RUINS ambience_index = AMBIENCE_RUINS
flags_1 = CAN_BE_DIRTY_1 flags_1 = CAN_BE_DIRTY_1
sound_environment = SOUND_ENVIRONMENT_STONEROOM sound_environment = SOUND_ENVIRONMENT_STONEROOM

View File

@@ -46,12 +46,12 @@
/area/ruin/unpowered/syndicate_lava_base /area/ruin/unpowered/syndicate_lava_base
name = "Secret Base" name = "Secret Base"
icon_state = "dk_yellow" icon_state = "dk_yellow"
ambientsounds = HIGHSEC ambience_index = AMBIENCE_DANGER
/area/ruin/unpowered/cultaltar /area/ruin/unpowered/cultaltar
name = "Cult Altar" name = "Cult Altar"
flags_1 = CULT_PERMITTED_1 flags_1 = CULT_PERMITTED_1
ambientsounds = SPOOKY ambience_index = AMBIENCE_SPOOKY
//Syndicate lavaland base //Syndicate lavaland base

View File

@@ -228,7 +228,7 @@
/area/ruin/space/has_grav/ancientstation/atmo /area/ruin/space/has_grav/ancientstation/atmo
name = "Beta Station Atmospherics" name = "Beta Station Atmospherics"
icon_state = "red" icon_state = "red"
ambientsounds = ENGINEERING ambience_index = AMBIENCE_ENGI
has_gravity = TRUE has_gravity = TRUE
/area/ruin/space/has_grav/ancientstation/betacorridor /area/ruin/space/has_grav/ancientstation/betacorridor
@@ -238,7 +238,7 @@
/area/ruin/space/has_grav/ancientstation/engi /area/ruin/space/has_grav/ancientstation/engi
name = "Charlie Station Engineering" name = "Charlie Station Engineering"
icon_state = "engine" icon_state = "engine"
ambientsounds = ENGINEERING ambience_index = AMBIENCE_ENGI
/area/ruin/space/has_grav/ancientstation/comm /area/ruin/space/has_grav/ancientstation/comm
name = "Charlie Station Command" name = "Charlie Station Command"

View File

@@ -29,7 +29,7 @@
/area/shuttle/syndicate /area/shuttle/syndicate
name = "Syndicate Infiltrator" name = "Syndicate Infiltrator"
ambientsounds = HIGHSEC ambience_index = AMBIENCE_DANGER
area_limited_icon_smoothing = /area/shuttle/syndicate area_limited_icon_smoothing = /area/shuttle/syndicate
/area/shuttle/syndicate/bridge /area/shuttle/syndicate/bridge

View File

@@ -1024,7 +1024,7 @@ GLOBAL_LIST_INIT(hallucination_list, list(
target.playsound_local(source, pick('sound/voice/human/manlaugh1.ogg', 'sound/voice/human/manlaugh2.ogg'), 50, 1) target.playsound_local(source, pick('sound/voice/human/manlaugh1.ogg', 'sound/voice/human/manlaugh2.ogg'), 50, 1)
if("creepy") if("creepy")
//These sounds are (mostly) taken from Hidden: Source //These sounds are (mostly) taken from Hidden: Source
target.playsound_local(source, pick(CREEPY_SOUNDS), 50, 1) target.playsound_local(source, pick(GLOB.creepy_ambience), 50, 1)
if("tesla") //Tesla loose! if("tesla") //Tesla loose!
target.playsound_local(source, 'sound/magic/lightningbolt.ogg', 35, 1) target.playsound_local(source, 'sound/magic/lightningbolt.ogg', 35, 1)
addtimer(CALLBACK(target, /mob/.proc/playsound_local, source, 'sound/magic/lightningbolt.ogg', 65, 1), 30) addtimer(CALLBACK(target, /mob/.proc/playsound_local, source, 'sound/magic/lightningbolt.ogg', 65, 1), 30)

View File

@@ -209,6 +209,7 @@
#include "code\_globalvars\lists\poll_ignore.dm" #include "code\_globalvars\lists\poll_ignore.dm"
#include "code\_globalvars\lists\typecache.dm" #include "code\_globalvars\lists\typecache.dm"
#include "code\_globalvars\lists\xenobiology.dm" #include "code\_globalvars\lists\xenobiology.dm"
#include "code\_globalvars\lists\ambience.dm"
#include "code\_js\byjax.dm" #include "code\_js\byjax.dm"
#include "code\_js\menus.dm" #include "code\_js\menus.dm"
#include "code\_onclick\adjacent.dm" #include "code\_onclick\adjacent.dm"