ID:163259
 
Is there a simpler way of putting:

if(!usr.client.screen.Find(/obj/HUD/Ships/Rark)&&!usr.client.screen.Find(/obj/HUD/Ships/Sloop)&&!usr.client.screen.Find(/obj/HUD/Ships/Schooner))


As you can see its practically the same thing each time, but I can't find a way of shortening the line.

~Ease~
var/found = 0
for(var/shipType in typesof(/obj/HUD/Ships)-/obj/HUD/Ships)
if(usr.client.screen.Find(shipType))
found = 1
break
if(!found)

That would probably be the simplest way to do it.

Or better yet, make a function that accepts two lists and searches for any instances of one list in the other, then you can use just that one function in every situation where you require this.
In response to Loduwijk
Thank you! Oh, and good to see you around. I have seen your name that much on the forums recently! =D

~Ease~
This is kind of moot since Find() will fail you here. You'll never find a type path in a list that contains only objects. I think what you need is locate() instead.

Lummox JR