I was able to get this from Eddy-B:
void GetFactoryCargo(Unit &u,int bay,map_id &unitType,map_id &weaponType)
{
int p=*((int *)0x0054F848)+*((int *)&u)*120;
map_id type=u.GetType();
switch (type)
{
case map_Structure_Factory:
unitType=(map_id)*((char *)(p+bay+0x61));
weaponType=(map_id)*((char *)(p+bay+0x48));
break;
case map_Spaceport:
unitType=(map_id)*((char *)(p+0x6E));
weaponType=(map_id)*((char *)(p+bay+0x61));
break;
default:
unitType=weaponType=map_None;
break;
}
}
Btw, he might be a little dangerous. He was asking me how to repair structures (besides SetDamage). I said, yes there is a way but I'd rather not reveal it at the moment. (Didn't mention the word CommandPacket, didn't want to get him started at it).
He wanted to trade this code for code to repair a structure, but he ended up just giving this to me.
So, be prepared. I think I might be able to get a couple other functions as well.