Ejemplo n.º 1
0
        public EoiDataAsset(FileSystemDataAsset fileSystemDataAsset)
        {
            if (fileSystemDataAsset == null)
            {
                return;
            }

            _fileSystemAsset = fileSystemDataAsset;

            this.Id = fileSystemDataAsset.TypeId;

            _type = EoiDataInterface.GetTypeById(this.Id);
        }
Ejemplo n.º 2
0
        public EoiDataAsset(RawEsiAsset esiAsset)
        {
            if (esiAsset != null)
            {
                this.Id = esiAsset.type_id;

                _type = EoiDataInterface.GetTypeById(this.Id);

                if (_fileSystemAsset == null)
                {
                    _fileSystemAsset = FileSystemDataInterface.CreateAsset(esiAsset.type_id, esiAsset.quantity);
                }
            }
        }
Ejemplo n.º 3
0
        internal int GetCalculatedMaterialQuantity(int runs, EoiDataType material)
        {
            //if (_fileSystemBlueprint == null)
            //    return _staticBlueprint.GetMaterialQuantity(material.GetStaticType());

            int     result           = 0;
            decimal baseQuantity     = _staticBlueprint.GetMaterialQuantity(material.GetStaticType());
            int     materialEfficeny = SettingsInterface.GlobalSettings.NotOwnedMe;

            if (_fileSystemBlueprint != null)
            {
                materialEfficeny = _fileSystemBlueprint.MaterialEfficency;
            }

            decimal materialModifier = Convert.ToDecimal(1 - (materialEfficeny * 0.01)) * Convert.ToDecimal(1 - (SettingsInterface.GlobalSettings.StructureMaterialBonus * 0.01m));

            result = Math.Max(runs, Convert.ToInt32(Math.Ceiling(Math.Round(runs * baseQuantity * materialModifier, 2))));
            return(result);
        }
Ejemplo n.º 4
0
 internal int GetProductQuantity(EoiDataType product)
 {
     return(_staticBlueprint.GetProductQuantity(product.GetStaticType()));
 }