UFO:Alien Invasion
Development => Coding => Topic started by: Hoehrer on March 29, 2006, 05:58:45 pm
-
Yet again a questiona bout finding data.
What i need a list/loop of all items (objDef_t) that are owend by me (in base/on soldiers). What i don't need: A list of all possible items .. this i already know ;)
I hope s/b can help me again.
Thanks,
Werner
-
we have no inventory in bases - just a global inventory...
-
we have no inventory in bases - just a global inventory...
And how(where) is determined what i own (and how many of it) and what not?
Thanks,
Werner
-
ccs.eCampaign and ccs.eMarket
both contains a int var num
-
ccs.eCampaign and ccs.eMarket
both contains a int var num
Ah. perfect. Many thanks for the fast answer :D
Werner
-
ccs.eCampaign and ccs.eMarket
both contains a int var num
Just one small thing left:
items in eMarket are the ones i can buy, but do not yet own, am i right?
EDIT this is the function i'm currently using
/*======================
RS_MarkCollected
Marks all techs if an item they 'provide' have been collected.
Should be run after items have been collected/looted from the battlefield (cl_campaign.c -> "CL_CollectItems") and after techtree/inventory init (for all).
======================*/
void RS_MarkCollected ( void )
{
int i;
for ( i=0; i < MAX_OBJDEFS; i++ ) {
if ( ccs.eCampaign.num[i] ) {
RS_MarkOneCollected( csi.ods[i].kurz );
}
}
}
Werner