[MIRROR] Fix chem dispenser feedback (#28750)

* Fix chem dispenser feedback (#84781)

## About The Pull Request
When the beaker is full, chem dispenser thinks it should dispense 0
chemicals.
If 0 chemicals should be dispensed, `cell.use` returns 0. The same value
is returned when there isn't enough energy in the cell.
Because of that, the dispenser was confused and gave off the wrong
message. I added a check to fix that.
Closes #84780.
## Why It's Good For The Game
Bug bad
## Changelog
🆑
fix: fixed dubious chem dispenser feedback when the beaker is full
/🆑

* Fix chem dispenser feedback

---------

Co-authored-by: zoomachina <97964454+zoomachina@users.noreply.github.com>
This commit is contained in:
SkyratBot
2024-07-09 19:40:28 +05:30
committed by GitHub
co-authored by zoomachina
parent dcdf918a91
commit b430ab08eb
@@ -331,6 +331,9 @@
var/datum/reagents/holder = beaker.reagents
var/to_dispense = max(0, min(amount, holder.maximum_volume - holder.total_volume))
if(!to_dispense)
say("The container is full!")
return
if(!cell.use(to_dispense * power_cost))
say("Not enough energy to complete operation!")
return