Skip to content

Commit

Permalink
[MIRROR] Fixes smartfridges showing overlays when there is nothing in…
Browse files Browse the repository at this point in the history
…side [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 <[email protected]>
Co-authored-by: Andrew <[email protected]>
  • Loading branch information
3 people authored Dec 3, 2023
1 parent 809da32 commit f2a5269
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions code/modules/food_and_drinks/machinery/smartfridge.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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()
. = ..()
Expand Down

0 comments on commit f2a5269

Please sign in to comment.