else
var/atom/A = new path(arglist(L))
if (variables)
var/nq_dmm_object/new_obj
for (var/key in variables)
new_obj = variables[key]
if (istype(new_)) A.vars[key] = new_obj.Instantiate(ispath(new_obj.path, /atom/movable) ? null : A)
else A.vars[key] = variables[key]
return A
Problem description:
I am using NQ's dmm suite. Here, in Instantiate() hundreds of runtimes were caused due to A being null. I suspect this is because the path is not /atom (I did some testing and most were /obj). The only way I can think of around this problem is to change the else clause to:
else
var/A = new path(arglist(L))
if (variables)
var/nq_dmm_object/new_obj
for (var/key in variables)
new_obj = variables[key]
if (istype(new_obj)) A:vars[key] = new_obj.Instantiate(ispath(new_obj.path, /atom/movable) ? null : A)
else A:vars[key] = variables[key]
return A
Notice how I change var/atom/A to var/A and have to use the : operator to prevent compile errors (as opposed to the . operator). I understand the operator is widely frowned upon, since there is almost always an easy way around it. I cannot for the life of me figure out a way to not need it.
What runtime errors were you getting? It shouldn't matter what type A is declared as.