ID:163240
 
I've got a list of objects
is there a way to just directly refernce the objects?
something like:
ListName[ID].ObjectVariable=X

that doesnt work due to the []s
so what i have to do is
var/obj/ObjName=ListName[ID]
ObjName.ObjectVariable=X

not exactly a major concern, just a minor waste of time and space <.<
so anyone know a way to do something like the first example instead?
Hmm I'm not really sure how your would directly reference and obj but I'm pretty sure you can use a loop to access the properties.
for(var/obj/O in SomeList)
if(O.name=="the_name_I_want")
src<<O.density

That was just a random sample.
In response to Kakashi24142
well, the list contains several datums, which each contain a list of their own, which you can only have one of these selected at a time, and you use the left/right arrows to go through them. so something like
usr.CurrentList=AllDatums[usr.ListIndex+1].DatumsList
//something like this code would be on the right arrow
//to select the next list

but i cant do that due to the []s so i have to create a variable for the datum first, which as i said is nothing major, just somewhat inconvenient
In response to Falacy
Nope, BYOND doesn't support this. It gets a bit annoying when you have a type path which is really long, but it is because lists are untyped, so DM doesn't know what the list contains at compile time.