mirror of
https://github.com/KabKebab/GS13.git
synced 2026-08-28 07:26:17 +01:00
Add null checks to client prefs checks
client.prefs. -> client?.prefs?.
This commit is contained in:
@@ -37,7 +37,7 @@ SUBSYSTEM_DEF(jukeboxes)
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
if(!M.client)
|
||||
continue
|
||||
if(!(M.client.prefs.toggles & SOUND_INSTRUMENTS))
|
||||
if(!(M.client?.prefs?.toggles & SOUND_INSTRUMENTS))
|
||||
continue
|
||||
|
||||
M.playsound_local(M, null, 100, channel = youvegotafreejukebox[2], S = song_to_init)
|
||||
@@ -105,7 +105,7 @@ SUBSYSTEM_DEF(jukeboxes)
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
if(!M.client)
|
||||
continue
|
||||
if(!(M.client.prefs.toggles & SOUND_INSTRUMENTS) || !M.can_hear())
|
||||
if(!(M.client?.prefs?.toggles & SOUND_INSTRUMENTS) || !M.can_hear())
|
||||
M.stop_sound_channel(jukeinfo[2])
|
||||
continue
|
||||
|
||||
|
||||
Reference in New Issue
Block a user