mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 21:18:37 +01:00
[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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user