The in operator does not work when you use it with && but the same exact check works perfect if you use the Find proc
Numbered Steps to Reproduce Problem:
Try using the example below, you will see for yourself that there is a problem, the two lines of code should do the exact same thing, but only the second one works.
Code Snippet (if applicable) to Reproduce Problem:
if(src in usr.equipment && istype(over_object,/obj/hud))
if(usr.equipment.Find(src) && istype(over_object,/obj/hud))
Expected Results:
Actual Results:
The actual results I got were that when I used Find it worked, but that was after an hour of trying everything possible to figure out why it didnt work.
Does the problem occur:
Every time? Or how often?
In other games?
In other user accounts?
On other computers?
When does the problem NOT occur?
Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
Workarounds:
That'll give you the expected results.