ceiling to avoid infinity ez nutriment.
This commit is contained in:
@@ -196,7 +196,7 @@
|
||||
dat += "<A href='?src=[REF(src)];create=[D.id];amount=5'>x5</A>"
|
||||
if(ispath(D.build_path, /obj/item/stack))
|
||||
dat += "<A href='?src=[REF(src)];create=[D.id];amount=10'>x10</A>"
|
||||
dat += "([round(D.materials[SSmaterials.GetMaterialRef(/datum/material/biomass)]/efficiency)])<br>"
|
||||
dat += "([CEILING(D.materials[SSmaterials.GetMaterialRef(/datum/material/biomass)]/efficiency, 1)])<br>"
|
||||
dat += "</div>"
|
||||
else
|
||||
dat += "<div class='statusDisplay'>No container inside, please insert container.</div>"
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user