From 130dcc6de9b809ebd6bb1f7d0b96d2da5fe9f908 Mon Sep 17 00:00:00 2001 From: Andrew Date: Sun, 3 Dec 2023 00:49:01 +0300 Subject: [PATCH] Fixes smartfridges showing overlays when there is nothing inside (#79982) ## About The Pull Request It was considering stock parts as contents after the refactor in #79623 ## Why It's Good For The Game Bug fix ## Changelog :cl: MrMelbert fix: smartfridges no longer show false overlays /:cl: --- code/modules/food_and_drinks/machinery/smartfridge.dm | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/code/modules/food_and_drinks/machinery/smartfridge.dm b/code/modules/food_and_drinks/machinery/smartfridge.dm index 3b805bb2768..d3ea6884f11 100644 --- a/code/modules/food_and_drinks/machinery/smartfridge.dm +++ b/code/modules/food_and_drinks/machinery/smartfridge.dm @@ -225,10 +225,7 @@ /// Returns the number of items visible in the fridge. Faster than subtracting 2 lists /obj/machinery/smartfridge/proc/visible_items() - var/component_part_count = 0 - for(var/datum/stock_part/datum_part in component_parts) - component_part_count -= 1 - return contents.len - component_part_count + return contents.len - 1 // Circuitboard /obj/machinery/smartfridge/update_overlays() . = ..()