From f2a5269383745d84bcbcd0829214afbcb868ff9f Mon Sep 17 00:00:00 2001 From: Iajret Creature <122297233+Steals-The-PRs@users.noreply.github.com> Date: Sun, 3 Dec 2023 21:44:22 +0300 Subject: [PATCH] [MIRROR] Fixes smartfridges showing overlays when there is nothing inside [MDB IGNORE] (#25392) (#924) * 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: * Fixes smartfridges showing overlays when there is nothing inside --------- Co-authored-by: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Co-authored-by: Andrew --- 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 e00cfeaaa7e..4cf66f27a6f 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() . = ..()