ID:269592
 
I was wondering if it'd be feasible to have datums and lots of lists store each individual persons mobs (which are identified by an owner variable and would be added at creation to the ownernameslist) so that instead of doing world searchs I could shrink down the search times? Would this not make any difference?
im not sure what you want so heres a demo of a way to store stuff
// a knida build system
mob
var
list
obj
mybuildings = new/list()
obj
empty
verb
remove_me()
set src in oview(1)
if(src in usr.mybuildings)
usr << "deleted [src.name]"
usr.mybuildings.Remove(src)
del(src)
else
usr << "you did not build this"
builde
verb
build()
ver/obj/empty/R = new/obj/empty
R.name = src.name
R.icon = src.icon
R.icon_state = src.icon_state
R.loc = locate(usr.x,usr.y,usr.z)
usr.mybuildings.Add(R)

In response to Zmadpeter
well the problem with storing the list in a mob is that all the mobs in the world are destructable. Also it'd be mobs being stored in a list.

The game is basically a RTS (think rise of nations, warcraft, etc).

I was thinking is it possible to create datums at run time? I would need to create a datum with the users name and then store all the mobs belonging to that user...

UNLESS I were to put a mob somewhere hidden (the one they log into) and store all the mobs in that little guy! Oooo... That might work.