Maybe fix sound token hard deletes (#96903)

## About The Pull Request

`remove_listener` would fail on logout so instead I figure we could
track the tokens on the mob, rather than the client

Functionally not much is changed - but if you go from ghost to mob it'll
remove the token from the ghost and adds the token to the new mob, so it
should fix the issue

There also doesn't need to be any code in `/mob/destroy` because we
listen for `listener_deleted` and remove listeners on the token itself
This commit is contained in:
MrMelbert
2026-07-10 22:39:25 -06:00
committed by GitHub
parent 25edacac7c
commit 18a1d31ca2
6 changed files with 8 additions and 19 deletions
-7
View File
@@ -75,13 +75,6 @@
///The visual delay to use for the current client.Move(), mostly used for making a client based move look like it came from some other slower source
var/visual_delay = 0
///////////////
//SOUND STUFF//
///////////////
/// Sound tokens currently playing for this client. Managed by /datum/sound_token and the soundtoken subsystem!! SOUND TOKENS 2026
var/list/datum/sound_token/sound_tokens = list()
////////////
//SECURITY//
////////////
-3
View File
@@ -640,8 +640,6 @@ GLOBAL_LIST_INIT(unrecommended_builds, list(
QDEL_LIST_ASSOC_VAL(char_render_holders)
sound_tokens = null
SSambience.remove_ambience_client(src)
SSmouse_entered.hovers -= src
SSping.currentrun -= src
@@ -653,7 +651,6 @@ GLOBAL_LIST_INIT(unrecommended_builds, list(
QDEL_NULL(loot_panel)
QDEL_NULL(parallax_rock)
seen_messages = null
sound_tokens = null
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