From 0663a3f01c64c5172bad320131315d368005e88c Mon Sep 17 00:00:00 2001 From: Ghommie <42542238+Ghommie@users.noreply.github.com> Date: Sat, 18 Apr 2020 18:18:22 +0200 Subject: [PATCH] ceiling to avoid infinity ez nutriment. --- code/modules/hydroponics/biogenerator.dm | 4 ++-- code/modules/research/designs/biogenerator_designs.dm | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/code/modules/hydroponics/biogenerator.dm b/code/modules/hydroponics/biogenerator.dm index 4edc0e8a13..52a050589f 100644 --- a/code/modules/hydroponics/biogenerator.dm +++ b/code/modules/hydroponics/biogenerator.dm @@ -196,7 +196,7 @@ dat += "x5" if(ispath(D.build_path, /obj/item/stack)) dat += "x10" - dat += "([round(D.materials[SSmaterials.GetMaterialRef(/datum/material/biomass)]/efficiency)])
" + dat += "([CEILING(D.materials[SSmaterials.GetMaterialRef(/datum/material/biomass)]/efficiency, 1)])
" dat += "" else dat += "
No container inside, please insert container.
" @@ -239,7 +239,7 @@ /obj/machinery/biogenerator/proc/check_cost(list/materials, multiplier = 1, remove_points = TRUE) if(materials.len != 1 || materials[1] != SSmaterials.GetMaterialRef(/datum/material/biomass)) return FALSE - var/cost = round(materials[SSmaterials.GetMaterialRef(/datum/material/biomass)]*multiplier/efficiency) + var/cost = CEILING(materials[SSmaterials.GetMaterialRef(/datum/material/biomass)]*multiplier/efficiency, 1) if (cost > points) menustat = "nopoints" return FALSE diff --git a/code/modules/research/designs/biogenerator_designs.dm b/code/modules/research/designs/biogenerator_designs.dm index cb8934577b..f6355074b9 100644 --- a/code/modules/research/designs/biogenerator_designs.dm +++ b/code/modules/research/designs/biogenerator_designs.dm @@ -2,7 +2,7 @@ ///////Biogenerator Designs /////// /////////////////////////////////// -//Please be wary to not add inorganic items to the results such as glass bottles and metal. +//Please be wary to not add inorganic items to the results such as generic glass bottles and metal. //as they kind of defeat the design of this feature. /datum/design/milk