- im sure its simple but i cant find a good way to do it..
here is what i have done.
verb
cook()
set category = "test"
set src in oview(1)
switch(input("what do you want to cook?", text) in list("rabbit stew","Chicken"))
if("rabbit stew")
if(usr.rMeat >=1)
usr << "you start making rabbit stew"
sleep(5)
usr.contents += new/obj/food/stew
usr.rMeat -=1
for(var/obj/food/rMeat in usr.contents)
if(rMeat)
usr.contents -= /obj/food/rMeat
else
usr <<"you do not have the neccesary ingrediends"
return
its messy i know :P
anyways, it fails to remove rMeat from the usr.contents. i tryed making :(instead of what is above)
var/obj/food/rMeat/R
and then
for(var/obj/food/R in usr.contents)
if(R)
del(R)
this however leads to all the rMeat in the inventory to be deleted, i need it to only delete one .
hope anyone can help or point me in the right direction.
Best regards
Zeppo
var/obj/O = locate(/obj/food/rMeat) in usr.contents
Then use if(O) to see if it found it.