Fixes material sniffers not being able to find materials properly (#75354)

![image](https://github.com/tgstation/tgstation/assets/6209658/d91d07ba-32b3-4580-a22a-616e0aab55e2)

stack/init was adding stacks to the global list if they had LESS THAN 10
units, though the sniffer only looks for things >= 10 units. Flipped
bracket, gg. add() was also using += instead of |=, which resulted in
duplicate entries for the same object in the global list when adding
stuff to a stack.

🆑 ShizCalev
fix: The materials sniffer now actually works!
/🆑
This commit is contained in:
ShizCalev
2023-05-11 21:57:51 -04:00
committed by GitHub
parent c08079f3e0
commit ef92ecefb9
2 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -227,7 +227,7 @@ GLOBAL_LIST_EMPTY(sniffable_sheets)
worn_icon_state = "pinpointer_black"
/obj/item/pinpointer/material_sniffer/scan_for_target()
if(target)
if(target || !GLOB.sniffable_sheets.len)
return
var/obj/item/stack/sheet/new_sheet_target
var/closest_distance = INFINITY