ID:158906
Jun 12 2009, 6:02 am
|
|
Does adding an object to a list using listname += object physically move the object into the list like contents, or will it simply add it as a reference? I want to add it as a reference.
|
Jun 12 2009, 6:25 am
|
|
If I recall correctly, it adds it like a reference to the actual object - it does not move it from one list to the other.
|
For something like this, it would take less time to try it for yourself than to make this forum post, let alone wait for an answer:
mob/verb/test() |
Get this into your head, a lot of people have misconceptions with this: Lists have nothing to do with locations. Any value, including movable objects, can be in any number of lists at the same time. Adding an object to a list doesn't remove it from another list, or move it on the map, etc.
The only exception is the contents list which is a special list (like all of the built-in lists). Being a built-in var tied into the movement system it has special, unique behavior, in that it can affect atoms' locations. But that applies only to the contents list, not to any other list. You can put the same obj in a thousand regular /lists. |