I'm trying to check for the axe in my "back Pack" before the usr can chop down the tree:
obj
tree
icon = 'enviroment.dmi'
icon_state = "tree"
density = 1
verb
chop()
set src in view(1)
if(/obj/axe in contents) // <-- this is my problem. Need to chek if Axe is in contents but it doesnt seem to be checking
switch(alert("Chop down tree?",,"Yes","No"))
if("Yes")
var/obj/wood/w = new(locate(src))
w.desc = "Wood"
del src
if("No")
return
else
usr << "You have no axe. You should find one or buy one"