ID:165308
 
like if you had a
obj 
potion_making
Ditox_leaf
icon='cauldron-items.dmi'
icon_state="ditox-leaf"


in your invitory, and you go up to a cauldron and use the mix verb (thats in the cauldron coding) it will ask you what you want to add, then it lists everything in your invitory that branches off of /obj/potion_making like if you had the Ditox_leaf (in coding above) it would list that, you know what i mean?
Ah I know what you mean, you coukd make alist variable a bit like this:
obj/Smithy
density = 1
icon = 'items.dmi'
Click()
if(get_step_away(src,usr,1))
var/list/PotionStuff = list()
for(var/obj/potion_making/P in usr)
PotionStuff += P
var/Choice = input("What would you like to craft with?","What") in PotionStuff+("Cancel")
In response to Lyndonarmitage1
...Wait, what? What's with the "Cancel" option? This is much more worthy of a Cancel button. This is done by passing null as an input type, and then checking for null in the return.
In response to Lyndonarmitage1
var/Choice = input("What would you like to craft with?","What") as null|anything in PotionStuff


No sense in adding a cancel option. DM gives you the ability to place a button.

Also, you must call the parent (..()) on a click() function.
In response to Lyndonarmitage1
ok now i got this error it says variable defined but not used?, its on the Choice part.

get back to me soon
~Volks