Cultists can now reliably find their cult dagger (#18367)

* cult find thing good

* return null

* extra space be gone
This commit is contained in:
Contrabang
2022-07-14 11:01:02 +01:00
committed by GitHub
parent dcb4d43e5c
commit 4ab98ea3f8
+6 -8
View File
@@ -276,12 +276,10 @@
return r_hand
return null
//search for a path in inventory and storage items in that inventory (backpack, belt, etc) and return it. Not recursive, so doesnt search storage in storage
//search for a path in inventory and storage items in that inventory (backpack, belt, etc) and return it.
/mob/proc/find_item(path)
for(var/obj/item/I in contents)
if(istype(I, /obj/item/storage))
for(var/obj/item/SI in I.contents)
if(istype(SI, path))
return SI
else if(istype(I, path))
return I
var/list/L = get_contents()
for(var/obj/B in L)
if(B.type == path)
return B