mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Fixed issue 758. it will stop overflowing now.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4340 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -117,8 +117,9 @@
|
|||||||
var/obj/item/weapon/reagent_containers/glass/B = src.beaker
|
var/obj/item/weapon/reagent_containers/glass/B = src.beaker
|
||||||
var/datum/reagents/R = B.reagents
|
var/datum/reagents/R = B.reagents
|
||||||
var/space = R.maximum_volume - R.total_volume
|
var/space = R.maximum_volume - R.total_volume
|
||||||
|
|
||||||
R.add_reagent(data, min(amount, energy * 10, space))
|
R.add_reagent(data, min(amount, energy * 10, space))
|
||||||
energy = max(energy - min(amount, space) / 10, 0)
|
energy = max(energy - min(amount, energy * 10, space) / 10, 0)
|
||||||
|
|
||||||
amount = round(amount, 10) // Chem dispenser doesnt really have that much prescion
|
amount = round(amount, 10) // Chem dispenser doesnt really have that much prescion
|
||||||
if (amount < 0) // Since the user can actually type the commands himself, some sanity checking
|
if (amount < 0) // Since the user can actually type the commands himself, some sanity checking
|
||||||
|
|||||||
Reference in New Issue
Block a user