Hi, I have a very specific parent/child inheritance tree planned for my game, and one of the requirements is to create a new atom called /atom/env. Half of the types in my game would be based from this (including rooms, exits, items, NPCs, etc)
However, I'm having trouble with "new /atom". I find that when I use this inside of Client.New() it returns the error "bad loc". I've tried "new /atom(validlocation)" and this doesn't work either.
More specifically, what I'm trying to do is "new /atom/env/room", but I've figured out that the problem is with "new /atom". I have no trouble at all with "new /atom/movable"
Should I make /env a child of /atom/movable? I was going to avoid this since rooms and exits don't need the extra vars and procs found under /movable, but if it's the only way, then I'm down with that. I'd just really like to understand what's failing here and why.
Many thanks
-- John M.
ID:155098
Sep 19 2011, 3:56 pm
|
|
In response to LordAndrew
|
|
Alright, so I could define my /env under /obj, and simply define procs or vars off /atom when I want them to apply to everything (including players).
That's fine, but I notice these vars which I don't expect to ever use and they don't seem to accept a null value: id = 0 animate_movement = 1 x = 0 y = 0 z = 0 pixel_step_size = 0 overlays = /list underlays = /list dir = 2 visibility = 1 luminosity = 0 opacity = 0 density = 0 layer = 3 mouse_drop_pointer = 1 mouse_drop_zone = 0 verbs = /list invisibility = 0 infra_luminosity = 0 pixel_x = 0 pixel_y = 0 mouse_opacity = 1 pixel_z = 0 override = 0 Since I expect to have potentially thousands of instances of /env objects, would it be worth defining it under /datum instead, so I can ditch all these vars (and probably a lot or procs, too)? The main useful vars I would lose are /name, /desc, /gender and /contents. Out of the 4, /gender would seem to be the hardest functionality to duplicate. Does that sound like a worthwhile endeavor or a waste of time? BTW, this is all for a text MUD with no foreseen usage of the map window. -- JM |
Instead you're meant to use the four types already available, or create your own /datum to handle things.