ID:179236
 
for(var/obj/O in src.contents+src.RightHand+src.LeftHand)

Funny, but I thought this was supposed to search each one of those lists for that item, and if it finds it, then continue? It seems to marge the contents of all those lists together. It is supposed to do this, have I missed something that I'm doing wrong, or is this a bug?
Foomer wrote:
for(var/obj/O in src.contents+src.RightHand+src.LeftHand)

Funny, but I thought this was supposed to search each one of those lists for that item, and if it finds it, then continue? It seems to marge the contents of all those lists together. It is supposed to do this, have I missed something that I'm doing wrong, or is this a bug?

That should be merging list contents, at least for the purposes of the for() loop. Did you mean that's what's happening, or that it's changing at least one of the lists involved by adding other items to it?

Lummox JR
In response to Lummox JR
The above for loop cheacks for to see if a certain item is present in any of those lists. The only problem is, whever I use it, any items in the LeftHand or RightHand lists end up with duplicates in the contents list.

setting just src.contents gets rid of the problem, as does setting it to RightHand+LeftHand, but when I have all 3, it does weird things...


Anyway, it seems to be a fluke but I have no idea what's causing it...