Exemple #1
0
        /// <summary>
        /// Inventory Blueprint Types
        /// </summary>
        /// <returns><c>Bag</c> of Inventory Blueprint Types</returns>
        internal static Bag <InvBlueprintTypes> BlueprintTypes()
        {
            var list = new IndexedList <InvBlueprintTypes>();

            foreach (var blueprint in Context.invBlueprintTypes)
            {
                var item = new InvBlueprintTypes
                {
                    ID                       = blueprint.blueprintTypeID,
                    ParentID                 = blueprint.parentBlueprintTypeID,
                    ProductTypeID            = blueprint.productTypeID.Value,
                    ProductionTime           = blueprint.productionTime.Value,
                    TechLevel                = blueprint.techLevel.Value,
                    ResearchProductivityTime = blueprint.researchProductivityTime.Value,
                    ResearchMaterialTime     = blueprint.researchMaterialTime.Value,
                    ResearchCopyTime         = blueprint.researchCopyTime.Value,
                    ResearchTechTime         = blueprint.researchTechTime.Value,
                    ProductivityModifier     = blueprint.productivityModifier.Value,
                    WasteFactor              = blueprint.wasteFactor.Value,
                    MaxProductionLimit       = blueprint.maxProductionLimit.Value
                };

                list.Items.Add(item);
            }

            return(new Bag <InvBlueprintTypes>(list));
        }
Exemple #2
0
        /// <summary>
        /// Add properties to a blueprint.
        /// </summary>
        /// <param name="srcBlueprint"></param>
        /// <param name="blueprintsGroup"></param>
        /// <returns></returns>
        private static void CreateBlueprint(InvTypes srcBlueprint, ICollection <SerializableBlueprint> blueprintsGroup)
        {
            Util.UpdatePercentDone(Database.BlueprintsTotalCount);

            // Guard in case an item of blueprint type is not contained in the blueprints table (glorious CCP)
            if (Database.InvBlueprintTypesTable.All(x => x.ID != srcBlueprint.ID))
            {
                return;
            }

            InvBlueprintTypes blueprintType = Database.InvBlueprintTypesTable[srcBlueprint.ID];

            // Creates the blueprint with base informations
            SerializableBlueprint blueprint = new SerializableBlueprint
            {
                ID   = srcBlueprint.ID,
                Name = srcBlueprint.Name,
                Icon = srcBlueprint.IconID.HasValue
                    ? Database.EveIconsTable[srcBlueprint.IconID.Value].Icon
                    : String.Empty,
                ProduceItemID            = blueprintType.ProductTypeID,
                ProductionTime           = blueprintType.ProductionTime,
                ResearchProductivityTime = blueprintType.ResearchProductivityTime,
                ResearchMaterialTime     = blueprintType.ResearchMaterialTime,
                ResearchCopyTime         = blueprintType.ResearchCopyTime,
                InventionTime            = blueprintType.InventionTime,
                ReverseEngineeringTime   = blueprintType.ReverseEngineeringTime,
                MaxProductionLimit       = blueprintType.MaxProductionLimit,
            };

            // Metagroup
            SetBlueprintMetaGroup(srcBlueprint, blueprint);

            // Export item requirements
            GetRequirements(srcBlueprint, blueprint);

            // Look for the tech 2 or tech 3 variations that this blueprint invents
            GetInventingItems(srcBlueprint, blueprint);

            // Add this item
            blueprintsGroup.Add(blueprint);
        }
Exemple #3
0
        /// <summary>
        /// Inventory Blueprint Types.
        /// </summary>
        /// <returns><c>BagCollection</c> of Inventory Blueprint Types.</returns>
        private static BagCollection <InvBlueprintTypes> BlueprintTypes()
        {
            IndexedCollection <InvBlueprintTypes> collection = new IndexedCollection <InvBlueprintTypes>();

            foreach (invBlueprintTypes blueprint in s_context.invBlueprintTypes)
            {
                InvBlueprintTypes item = new InvBlueprintTypes
                {
                    ID       = blueprint.blueprintTypeID,
                    ParentID = blueprint.parentBlueprintTypeID,
                };

                if (blueprint.productTypeID.HasValue)
                {
                    item.ProductTypeID = blueprint.productTypeID.Value;
                }

                if (blueprint.productionTime.HasValue)
                {
                    item.ProductionTime = blueprint.productionTime.Value;
                }

                if (blueprint.techLevel.HasValue)
                {
                    item.TechLevel = blueprint.techLevel.Value;
                }

                if (blueprint.researchProductivityTime.HasValue)
                {
                    item.ResearchProductivityTime = blueprint.researchProductivityTime.Value;
                }

                if (blueprint.researchMaterialTime.HasValue)
                {
                    item.ResearchMaterialTime = blueprint.researchMaterialTime.Value;
                }

                if (blueprint.researchCopyTime.HasValue)
                {
                    item.ResearchCopyTime = blueprint.researchCopyTime.Value;
                }

                if (blueprint.researchTechTime.HasValue)
                {
                    item.ResearchTechTime = blueprint.researchTechTime.Value;
                }

                if (blueprint.duplicatingTime.HasValue)
                {
                    item.DuplicatingTime = blueprint.duplicatingTime.Value;
                }

                if (blueprint.reverseEngineeringTime.HasValue)
                {
                    item.ReverseEngineeringTime = blueprint.reverseEngineeringTime.Value;
                }

                if (blueprint.inventionTime.HasValue)
                {
                    item.InventionTime = blueprint.inventionTime.Value;
                }

                if (blueprint.productivityModifier.HasValue)
                {
                    item.ProductivityModifier = blueprint.productivityModifier.Value;
                }

                if (blueprint.wasteFactor.HasValue)
                {
                    item.WasteFactor = blueprint.wasteFactor.Value;
                }

                if (blueprint.maxProductionLimit.HasValue)
                {
                    item.MaxProductionLimit = blueprint.maxProductionLimit.Value;
                }

                collection.Items.Add(item);
            }

            BlueprintsTotalCount = collection.Items.Count;

            return(collection.ToBag());
        }