This is unnecessary, having all of this. What you should do is have a global list of the icons, and when a new chem master is created it will generate this list (if it isn't already), then just do, before you load the interface in interface()

>user << browse_rsc(bottle_icon_list[i], "bottle[i].png")

Then do the same for the pills.