If you swap these things out in the project list it fixes the list:
replace
Code:
static int CompareElm(C Element &a, C Element &b) {return Compare(a.obj ? a.obj->type() : UIDZero, b.obj ? b.obj->type() : UIDZero);}
with
Code:
static int CompareElm(C Element &a, C Element &b) {return Compare(a.obj ? a.obj.name() : S, b.obj ? b.obj.name() : S);}
comment out and swap like this
Code:
int types=0, type_max=0, tm=0; Str last_type; REPA(elements){Str type=(elements[i].obj ? elements[i].obj.name() : S); if(type!=last_type){last_type=type; types++; tm=0;} MAX(type_max, ++tm);} // go from end
//int types=0, type_max=0, tm=0; UID last_type=UIDZero; REPA(elements){UID type=(elements[i].obj ? elements[i].obj->type() : UIDZero); if(type!=last_type){last_type=type; types++; tm=0;} MAX(type_max, ++tm);} // go from end
Code:
Str type=(elm.obj ? elm.obj.name() : S);
if(type!=last_type){pos.x+=s; pos.y=-rect().h(); last_type=type;}
//UID type=(elm.obj ? elm.obj->type() : UIDZero);
//if(type!=last_type){pos.x+=s; pos.y=-rect().h(); last_type=type;}
This fixes the object list itself. Objects still do not place, but I hope it is as simple to fix lines like
Code:
if(obj_params)if(Memx<Obj> *obj_container=GetObjContainer(Game.ObjType.find(obj_params->type())))
You can see the differnece between 1.0 and 2.0 by copying this the game update or Player.update() and hitting Z
Code:
if(Kb.b(KB_Z))
{
CM.New(S+ ObjList.elements.elms());
REPA(ObjList.elements)CM.New(S+"name: "+ObjList.elements[i].obj.name()+ " id: " + ObjList.elements[i].obj.id().asText());
}
the id is null in 1.0, name returns null in 2.0