Skip to content

Commit

Permalink
Make weather fullscreen_type actually optional like its supposed to be
Browse files Browse the repository at this point in the history
  • Loading branch information
Drulikar committed May 25, 2024
1 parent d3489b8 commit 1fbdc5e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions code/_onclick/hud/fullscreen.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@
if (!screen || screen.type != type)
// needs to be recreated
clear_fullscreen(category, FALSE)
fullscreens[category] = screen = new type()
fullscreens[category] = screen = type ? new type() : null
else if ((!severity || severity == screen.severity) && (!client || screen.screen_loc != "CENTER-7,CENTER-7" || screen.fs_view == client.view))
// doesn't need to be updated
return screen

if(!screen)
return

screen.icon_state = "[initial(screen.icon_state)][severity]"
screen.severity = severity
if (client && screen.should_show_to(src))
Expand Down Expand Up @@ -55,7 +58,7 @@
var/atom/movable/screen/fullscreen/screen
for(var/category in fullscreens)
screen = fullscreens[category]
if(screen.should_show_to(src))
if(screen?.should_show_to(src))
screen.update_for_view(client.view)
client.add_to_screen(screen)
else
Expand Down

0 comments on commit 1fbdc5e

Please sign in to comment.