Skip to content

Commit

Permalink
Fixes smartfridges showing overlays when there is nothing inside (tgs…
Browse files Browse the repository at this point in the history
…tation#79982)

## About The Pull Request

It was considering stock parts as contents after the refactor in tgstation#79623

## Why It's Good For The Game

Bug fix

## Changelog

:cl: MrMelbert 
fix: smartfridges no longer show false overlays
/:cl:
  • Loading branch information
MTandi authored Dec 2, 2023
1 parent e5f4ab8 commit 130dcc6
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 130dcc6

Please sign in to comment.