Skip to content

Commit

Permalink
Merge branch 'Hybrisa' of https://github.com/Zenith00000/cmss13 into …
Browse files Browse the repository at this point in the history
…Hybrisa
  • Loading branch information
Zenith00000 committed May 25, 2024
2 parents 7efe28f + 1fbdc5e commit 49557b1
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 49557b1

Please sign in to comment.