Files
Bubberstation/code/modules/vending
SyncIt21 a884a91d27 Fixes returning items to vending machines (#78289)
## About The Pull Request
- Fixes #77719
- Fixes #68848

The problem was items that are subtypes of other items creates problems
for e.g. the medical winter coat & the paramedic winter coats

Type path for medical winter coat
![Screenshot
(295)](https://github.com/tgstation/tgstation/assets/110812394/87661390-b9ae-4c89-9284-832017151af9)

Type path for paramedic winter coat
![Screenshot
(296)](https://github.com/tgstation/tgstation/assets/110812394/c9fb3bf7-27c2-44b3-b5ff-3d814c7d3391)

The problem? paramedic winter coat is a subtype of
`/obj/item/clothing/suit/hooded/wintercoat/medical` but medical winter
coat type is `/obj/item/clothing/suit/hooded/wintercoat/medical` so when
returning these subtypes back to the vendor the `ispath()` check

7c0064c04c/code/modules/vending/_vending.dm (L1041)
Gets confused and it ends up returning the paramedic winter coat to the
medical wintercoat section cause it thought it was a subtype. The
solution is check if the returned products typepath absolutly matches
the products category typepath and not do a relative check.

The same problem applied to foods bought from a food vending machine.
Also removed the unused var `input_display_header` cause it did nothing.

- Fixes #76314

You now cannot return items to a vending machine if it has items in it's
contents so no returning vending trays with food on them or duffle bags
with items inside it or whatever.


## Changelog
🆑
fix: returning items to vendors works correctly
fix: you can't return items that has stuff in it for e.g. a serving tray
with food in it
/🆑
2023-09-15 15:20:52 +02:00
..