ID:135027
 
I don't know if this has been requested already, or if it's going to be phased out anyways because of 4.0's new methods of handling maps... but... when using the instance editor, any time I try to specify a variable as a list, it is reverted back to just list(), rather than list(variable1,variable2) etc. This is a problem for me unless I make unique types for every one of my ai route datums. I'm able to define lists in the dmps using notepad, but it might only be working because I convert them to swapmaps before they're actually used in the game.
look up newlist() in the reference.
In response to Ter13
He is talking about the instance editor. I don't think you can call functions using that.

In a map file, when using the map editor, right-click on an atom and choose to edit its variables. I do believe that is what he is talking about.
In response to Loduwijk
I've used newlist() in the instance editor before. It was a long time ago, but I think it is still possible.

But it does make sense, Lod, think about it, all variables under that are defined at compile-time have to be constant expressions unless in a procedure, and you can initialize a variable as newlist() as the compile-time value. So, logically, it follows that it would work in the instance editor.
In response to Ter13
I need a list, not a newlist. I'm dealing with type paths, but I don't want them to be actual datums that are created, I need them to remain type paths. I understand the difference between lists and newlists, I used to use newlists for contents, but I handle that differently now.
In response to Ter13
Ter13 wrote:
But it does make sense, Lod, think about it, all variables under that are defined at compile-time have to be constant expressions unless in a procedure, and you can initialize a variable as newlist() as the compile-time value.

I did not realise you could use newlist at compile time for precisely the reason you mention there. Variables are supposed to be set to constants at compile time. I had previously known only list and new to work at compile time, and even then thought them strange oddities.

'Tis quite illogical, though useful and nice to have. Lets us be lazy and skip using New all the time.

So, logically, it follows that it would work in the instance editor.

Firstly, as I just mentioned, I was not aware that newlist could be used at compile-time (Have not paid it much notice, as I have never even used newlist at all.) which cut my reasoning line short of that logical analysis.

Secondly, I would not have made that assumption anyway, that it would work in the map editor, since I don't put too much faith in the thing. Don't get me wrong, the thing is great; but I have had the thing become corrupted too many times when trying to make changes to it and so I don't bother with it so much when I can do what is needed in the code nearly as easily.

Either way, thanks for the heads up.
In response to DerDragon
In that case, I believe you don't type list(), you put your list in brackets.

{/obj/item/item1,/obj/item/item2,/obj/item/item3}

I may be wrong, but I think this is how you do it in the instance editor.
In response to DerDragon
DerDragon wrote:
I'm dealing with type paths, but I don't want them to be actual datums that are created, I need them to remain type paths.

If you're trying to put datum type paths into variables in the instance editor, it sounds like you may be running into a bug I stumbled across (and reported) a while back. Which is that the instance editor refuses to remember custom datum type paths (like /conv/shopkeeper). It will, however, remember atom type paths (like /obj/item/sword).

I got around it by manually editing the DMP file every time after I saved it in the map editor. :-X