ID:267169
 
Ok. I found out about the whole client/statobj var, and it works great. The only problem is that there doesnt seem to be a way to have multiple objects in there.
So while this is much cooler then putting if()'s in the Stat(), it isnt always the best course of action.
Maybe if Dantom added client/list/statobjs, which would combine the Stat()'s of all the objs in it.
-DogMan
Dog Man wrote:
Ok. I found out about the whole client/statobj var, and it works great. The only problem is that there doesnt seem to be a way to have multiple objects in there.
So while this is much cooler then putting if()'s in the Stat(), it isnt always the best course of action.
Maybe if Dantom added client/list/statobjs, which would combine the Stat()'s of all the objs in it.

There are other ways you could work around this--in fact you could set up the system to behave exactly as you want.
The trick is overriding client/Stat(), which by default calls statobj.Stat(). Instead you could do this:
client
Stat()
if(usr.statobjs) // usr == src.mob in this proc
for(var/atom/A in usr.statobjs)
A.Stat()
else
usr.Stat()

Lummox JR
In response to Lummox JR
Ahhh. Very interesting. I wouldn't have thought of that, but now it makes plenty of sense. I've got to learn to stop being so dependant on built in stuff.
-DogMan