ID:179310
 
Say i had a door that when you click on it it opens. But i only want the door to open if you have a key in your inventory. How would you do that?
if(usr.contents.Find(/obj/super_special_door_key))
//unlock door

or

for(var/obj/key/K in usr)
if(K.value == "Super Special Door Key")
//unlock door
break
In response to Foomer
i want to use the top one but it aint working