From 274ff7b1c48e1d80b85123c0c87caa0ab73d0501 Mon Sep 17 00:00:00 2001 From: Qwertytoforty <52090703+Qwertytoforty@users.noreply.github.com> Date: Sun, 5 May 2024 11:03:06 -0400 Subject: [PATCH] fixes sleepblind not being cleared if you are blind from othermeans (#25390) --- code/modules/mob/living/living_update_status.dm | 5 ++++- code/modules/mob/living/stat_states.dm | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/living_update_status.dm b/code/modules/mob/living/living_update_status.dm index 7394a6de87a..5f729221cf5 100644 --- a/code/modules/mob/living/living_update_status.dm +++ b/code/modules/mob/living/living_update_status.dm @@ -1,4 +1,7 @@ -/mob/living/update_blind_effects(sleeping = FALSE) +/mob/living/update_blind_effects(sleeping = FALSE, force_clear_sleeping = FALSE) + if(force_clear_sleeping) //We force it on waking up, as if you are blind from other methods it will refuse to clear it. + clear_fullscreen("sleepblind") + clear_fullscreen("disky") if(!has_vision(information_only=TRUE)) if(sleeping) overlay_fullscreen("sleepblind", /atom/movable/screen/fullscreen/center/blind/sleeping, animated = 2 SECONDS) diff --git a/code/modules/mob/living/stat_states.dm b/code/modules/mob/living/stat_states.dm index 2d72e6e498a..551eac92d1d 100644 --- a/code/modules/mob/living/stat_states.dm +++ b/code/modules/mob/living/stat_states.dm @@ -42,7 +42,7 @@ if(updating) update_sight() - update_blind_effects() + update_blind_effects(force_clear_sleeping = TRUE) if(hud_used && client) hud_used.show_hud(HUD_STYLE_STANDARD)