Fix Treasure Trove ambience list assignment (#22542)

* Please describe the intent of your changes in a clear fashion.
Addresses issue SERVER-PROD-3T: "Cannot read
'sound/ambience/konyang/konyang...'.len".

The `ambience` variable for `/area/trove/beach`, `/area/trove/ocean`,
and `/area/trove/jungle` was incorrectly assigned a raw file path string
instead of a `list()` containing the path. This caused a runtime error
when the `Entered()` proc attempted to access `.len` on the string,
which does not have that property.

This fix wraps the file path literals in `list()` for these three areas,
ensuring `ambience` is always a list as expected by the system.
* Please make sure that, in the case of mapping changes, you include
images of these changes in the PR's description.
* Please make sure to mark your PR as wip or review required by making a
comment with !wip or !review required
* If you include sprites/sounds/... (assets) that you have not created
yourself specify the license and original author below.
* Ensure that you also credit them in the appropriate location /
changelog as specified in the contributor guidelines

### Asset Licenses
The following assets that **have not** been created by myself are
included in this PR:

| Path | Original Author | License |
| --- | --- | --- |
| icons/example.dmi | ExamplePerson (Example Station) | CC0 |


Fixes SERVER-PROD-3T

---------

Co-authored-by: sentry[bot] <39604003+sentry[bot]@users.noreply.github.com>
Co-authored-by: VMSolidus <evilexecutive@gmail.com>
This commit is contained in:
sentry[bot]
2026-05-29 20:37:51 +00:00
committed by GitHub
co-authored by sentry[bot] <39604003+sentry[bot]@users.noreply.github.com> VMSolidus
parent e95e5de0f8
commit 3aa4942572
3 changed files with 14 additions and 4 deletions
+6 -1
View File
@@ -127,6 +127,11 @@
. = ..()
/area/Initialize(mapload)
#ifdef UNIT_TEST
if (!islist(ambience))
log_error("Area: [src.type] set list/ambience with [ambience] instead of a list. This var MUST be a list().")
#endif
icon_state = "white"
color = null
@@ -381,7 +386,7 @@
L.lastarea = newarea
// Start playing ambience.
if(src.ambience.len && L && L.client && (L.client.prefs.sfx_toggles & ASFX_AMBIENCE) && !L.ear_deaf)
if(length(src.ambience) && L && L.client && (L.client.prefs.sfx_toggles & ASFX_AMBIENCE) && !L.ear_deaf)
play_ambience(L)
else
stop_ambience(L)
@@ -0,0 +1,5 @@
author: Hellfirejag
delete-after: True
changes:
- bugfix: "Fixed the Hiskyn Treasure Trove away site not having any ambience."
- rscadd: "Map Areas will now cause unit tests to fail if given invalid ambience."
@@ -12,7 +12,7 @@
name = "Treasure Trove Beach"
icon_state = "yellow"
is_outside = OUTSIDE_YES
ambience = 'sound/ambience/konyang/konyang-water.ogg'
ambience = list('sound/ambience/konyang/konyang-water.ogg')
area_blurb = "You can hear the sound of waves hitting the shore. Something at the back of your mind makes you think the beauty of the area hides something darker."
/area/trove/beach/landing
@@ -21,14 +21,14 @@
name = "Treasure Trove Ocean"
icon_state = "purple"
is_outside = OUTSIDE_YES
ambience = 'sound/ambience/konyang/konyang-water.ogg'
ambience = list('sound/ambience/konyang/konyang-water.ogg')
area_blurb = "Endless blue in all directions broken by the occasional jutting rock."
/area/trove/jungle
name = "Treasure Trove Jungle"
icon_state = "green"
is_outside = OUTSIDE_YES
ambience = 'sound/ambience/eeriejungle1.ogg'
ambience = list('sound/ambience/eeriejungle1.ogg')
area_blurb = "Lush foliage and the sounds of distant animals... and something larger."
// ----- Interior