Skip to content

Commit

Permalink
refactor: null check client instead of typecheck
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaxeer committed Jan 31, 2024
1 parent 8716df5 commit 31af7d2
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions modular_ss220/loc_blurb/code/location_blurb.dm
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@
else
viewers = list(viewers)

for(var/client/viewer in viewers)
viewer.screen += src
for(var/client/viewer as anything in viewers)
if(viewer)
viewer.screen += src

appear()
print_text()
Expand Down Expand Up @@ -96,8 +97,9 @@
/obj/screen/text/blurb/proc/remove_from_viewers(list/client/viewers)
PRIVATE_PROC(TRUE)

for(var/client/viewer in viewers)
viewer.screen -= src
for(var/client/viewer as anything in viewers)
if(viewer)
viewer.screen -= src

qdel(src)

Expand Down

0 comments on commit 31af7d2

Please sign in to comment.