Ejemplo n.º 1
0
        public void Complete()
        {
            if (Items == null)
            {
                Items = new CollectionDefs();
            }
            Items.Complete();

            if (RepShops == null)
            {
                RepShops = new RepCollection[0];
            }
            RepShops = RepShops.Where(i => i.Items != null).OrderBy(i => i.Reputation).ToArray();

            foreach (var rep in RepShops)
            {
                if (rep.Items == null)
                {
                    rep.Items = new CollectionDefs();
                }
                rep.Items.Complete();
            }

            if (FactionShop == null)
            {
                FactionShop = new CollectionDefs();
            }
            FactionShop.Complete();
        }
Ejemplo n.º 2
0
        public void Complete()
        {
            if (SystemShops == null)
            {
                SystemShops = new CollectionDefs();
            }
            SystemShops.Complete();

            if (Factions == null)
            {
                Factions = new FactionInfo[0];
            }

            FactionInfos = new Dictionary <Faction, FactionInfo>();
            for (int i = 0; i < Factions.Length; i++)
            {
                Factions[i].Complete();
                try
                {
                    FactionInfos.Add(Factions[i].Faction, Factions[i]);
                }
                catch
                {
                }
            }

            if (BlackMarket == null)
            {
                BlackMarket = new CollectionDefs();
            }
            BlackMarket.Complete();

            if (GenericFactions != null && GenericFactions.Length > 0)
            {
                GenericFactions = GenericFactions.Where(i => i.Members != null && i.Members.Length > 0).ToArray();
                foreach (var item in GenericFactions)
                {
                    item.Complete();
                }
            }
        }