mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-29 18:40:42 +00:00
## About The Pull Request
So #90246 was caused purely because vendors don't actually reduce the
stock when dispensing returned items:
c0204da3da/code/modules/vending/_vending.dm (L1464-L1467)
While this could've been a single line fix by just decrementing the
stock like how returned items are handled elsewhere, instead we collapse
all these cases into being handled by `dispense(...)` so it's harder for
this to happen again. We make this a parameter because different
dispensing methods have different priorities.
As a side, we make it so `on_dispense(...)` forwards whether or not it's
a returned item, because logically mothroach infestations would still
snack on your clothes even if they're just returned. I felt it best to
make them deal less damage to returned clothes in that case.
## Why It's Good For The Game
Fixes #90246.
Fixes #89104.
Good if the special vendor stuff gets applied when items are thrown too
Being able to cycle items through the mothroach clothing gnawing machine
is funny
## Changelog
🆑
fix: Dispensing a returned item from a vendor actually reduces the
amount of stock for that item.
fix: Special vendor dispensing behaviours get applied to thrown items.
fix: Special vendor dispensing behaviours actually get applied to
returned items where applicable.
/🆑