diff --git a/code/modules/chemical/Chemistry-Machinery.dm b/code/modules/chemical/Chemistry-Machinery.dm index aebb052e6e9..e4635fbdf70 100644 --- a/code/modules/chemical/Chemistry-Machinery.dm +++ b/code/modules/chemical/Chemistry-Machinery.dm @@ -171,6 +171,8 @@ var/beaker = null var/mode = 0 var/condi = 0 + var/bottlesprite = "1" //yes, strings + var/pillsprite = "1" New() var/datum/reagents/R = new/datum/reagents(100) @@ -293,6 +295,7 @@ P.name = "[name] pill" P.pixel_x = rand(-7, 7) //random position P.pixel_y = rand(-7, 7) + P.icon_state = "pill"+pillsprite reagents.trans_to(P,50) else if (href_list["createbottle"]) if(!condi) @@ -302,10 +305,33 @@ P.name = "[name] bottle" P.pixel_x = rand(-7, 7) //random position P.pixel_y = rand(-7, 7) + P.icon_state = "bottle"+bottlesprite reagents.trans_to(P,30) else var/obj/item/weapon/reagent_containers/food/condiment/P = new/obj/item/weapon/reagent_containers/food/condiment(src.loc) reagents.trans_to(P,50) + else if(href_list["change_pill"]) + #define MAX_PILL_SPRITE 20 //max icon state of the pill sprites + var/dat = "" + for(var/i = 1 to MAX_PILL_SPRITE) + usr << browse_rsc(icon('chemical.dmi', "pill" + num2text(i)), "pill[i].png") + dat += "" + dat += "
" + usr << browse(dat, "window=chem_master") + return + else if(href_list["change_bottle"]) + #define MAX_BOTTLE_SPRITE 20 //max icon state of the bottle sprites + var/dat = "" + for(var/i = 1 to MAX_BOTTLE_SPRITE) + usr << browse_rsc(icon('chemical.dmi', "bottle" + num2text(i)), "bottle[i].png") + dat += "" + dat += "
" + usr << browse(dat, "window=chem_master") + return + else if(href_list["pill_sprite"]) + pillsprite = min(max(href_list["pill_sprite"],0),MAX_PILL_SPRITE) + else if(href_list["bottle_sprite"]) + bottlesprite = min(max(href_list["bottlesprite"],0),MAX_BOTTLE_SPRITE) else usr << browse(null, "window=chem_master") src.updateUsrDialog() @@ -355,8 +381,10 @@ else dat += "Empty
" if(!condi) - dat += "

Create pill (50 units max)
" - dat += "Create bottle (30 units max)" + usr << browse_rsc(icon('chemical.dmi', "pill" + pillsprite), "pill.png") + dat += "

Create pill (50 units max)
" + usr << browse_rsc(icon('chemical.dmi', "bottle" + bottlesprite), "bottle.png") + dat += "Create bottle (30 units max)" else dat += "Create bottle (50 units max)" if(!condi)