mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 11:43:31 +00:00
@@ -238,7 +238,7 @@
|
|||||||
count = input("Select the number of pills to make.", "Max [max_pill_count]", pillamount) as null|num
|
count = input("Select the number of pills to make.", "Max [max_pill_count]", pillamount) as null|num
|
||||||
if(!count) //Covers 0 and cancel
|
if(!count) //Covers 0 and cancel
|
||||||
return
|
return
|
||||||
count = CLAMP(count, 1, max_pill_count)
|
count = CLAMP(round(count), 1, max_pill_count) // Fix decimals input and clamp to reasonable amounts
|
||||||
|
|
||||||
if(reagents.total_volume/count < 1) //Sanity checking.
|
if(reagents.total_volume/count < 1) //Sanity checking.
|
||||||
return
|
return
|
||||||
@@ -260,7 +260,7 @@
|
|||||||
|
|
||||||
if(reagents.total_volume/count < 1) //Sanity checking.
|
if(reagents.total_volume/count < 1) //Sanity checking.
|
||||||
return
|
return
|
||||||
while (count--)
|
while(count-- > 0) // Will definitely eventually stop.
|
||||||
var/obj/item/weapon/reagent_containers/pill/P = new/obj/item/weapon/reagent_containers/pill(src.loc)
|
var/obj/item/weapon/reagent_containers/pill/P = new/obj/item/weapon/reagent_containers/pill(src.loc)
|
||||||
if(!name) name = reagents.get_master_reagent_name()
|
if(!name) name = reagents.get_master_reagent_name()
|
||||||
P.name = "[name] pill"
|
P.name = "[name] pill"
|
||||||
|
|||||||
Reference in New Issue
Block a user