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

🆑 MrMelbert 
fix: smartfridges no longer show false overlays
/🆑
This commit is contained in:
Andrew
2023-12-02 14:49:01 -07:00
committed by GitHub
parent e5f4ab8db0
commit 130dcc6de9
@@ -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()
. = ..()