From 78da484056f9cfa83f76a8a18a6ac82a8e832c1f Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Tue, 14 Feb 2023 03:18:00 +0100 Subject: [PATCH] [MIRROR] Prevents nulls in the always_visible_inventory list (which caused runtimes blocking PM reapplication) [MDB IGNORE] (#19329) * Prevents nulls in the always_visible_inventory list (which caused runtimes blocking PM reapplication) (#73400) ## About The Pull Request Attempting to add a null to images (even in a list) is a runtime, which in this case blocks off the rest of show_hud, breaking planemasters and other shit ## Why It's Good For The Game Closes #73387, closes #73364 ## Changelog :cl: fix: Equipping an fov item, disconnecting, waiting 6 minutes and reconnecting will no longer break your game /:cl: * Prevents nulls in the always_visible_inventory list (which caused runtimes blocking PM reapplication) --------- Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com> --- code/datums/components/fov_handler.dm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/code/datums/components/fov_handler.dm b/code/datums/components/fov_handler.dm index 9335711fa8c..0390357aced 100644 --- a/code/datums/components/fov_handler.dm +++ b/code/datums/components/fov_handler.dm @@ -97,13 +97,15 @@ /datum/component/fov_handler/proc/remove_mask() var/mob/parent_mob = parent var/client/parent_client = parent_mob.client + // Prevents stupid ass hard deletes + parent_mob.hud_used.always_visible_inventory -= blocker_mask + parent_mob.hud_used.always_visible_inventory -= visual_shadow if(!parent_client) //Love client volatility!! return applied_mask = FALSE parent_client.screen -= blocker_mask parent_client.screen -= visual_shadow - parent_mob.hud_used.always_visible_inventory -= blocker_mask - parent_mob.hud_used.always_visible_inventory -= visual_shadow + /datum/component/fov_handler/proc/add_mask() var/mob/parent_mob = parent