Ejemplo n.º 1
0
 internal static void CalculateAllBlueprints()
 {
     foreach (var bp in GetBlueprints())
     {
         BlueprintCalculator.Calculate(bp);
     }
 }
Ejemplo n.º 2
0
        private void OnMarketOrdersUpdated()
        {
            var region = Regions.GetTradehubRegionId(SolarSystems.GetSolarSystem(SettingsInterface.GlobalSettings.TradeHub));

            if (_esiMarketOrders != null)
            {
                var esiMarketOrders = _esiMarketOrders.FirstOrDefault(x => x.Region == region);
                if (esiMarketOrders != null)
                {
                    if (esiMarketOrders.Orders.Any(x => !x.is_buy_order))
                    {
                        _eoiBlueprint.Price = esiMarketOrders.Orders.Where(x => !x.is_buy_order).Min(x => x.price);
                    }
                    else
                    {
                        _eoiBlueprint.Price = 0;
                    }
                }
                else
                {
                    _eoiBlueprint.Price = 0;
                }
            }
            else
            {
                _eoiBlueprint.Price = 0;
            }

            BlueprintCalculator.Calculate(this);
        }
Ejemplo n.º 3
0
        private void EoiBlueprint_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
        {
            if (e.PropertyName == nameof(EoiBlueprint.Private))
            {
                if (_fileSystemBlueprint == null)
                {
                    _fileSystemBlueprint = FileSystemDataInterface.CreateBlueprint(this.Id);
                }

                _fileSystemBlueprint.Private = _eoiBlueprint.Private;
            }
            else if (e.PropertyName == nameof(EoiBlueprint.Owned))
            {
                if (_fileSystemBlueprint == null)
                {
                    _fileSystemBlueprint = FileSystemDataInterface.CreateBlueprint(this.Id);
                }

                _fileSystemBlueprint.Owned = _eoiBlueprint.Owned;
                this.Owned = _eoiBlueprint.Owned;
            }
            else if (e.PropertyName == nameof(EoiBlueprint.MaterialEfficency))
            {
                if (_fileSystemBlueprint == null)
                {
                    _fileSystemBlueprint = FileSystemDataInterface.CreateBlueprint(this.Id);
                }

                _fileSystemBlueprint.MaterialEfficency = _eoiBlueprint.MaterialEfficency;

                BlueprintCalculator.Calculate(this);
            }
            else if (e.PropertyName == nameof(EoiBlueprint.TimeEfficency))
            {
                if (_fileSystemBlueprint == null)
                {
                    _fileSystemBlueprint = FileSystemDataInterface.CreateBlueprint(this.Id);
                }

                _fileSystemBlueprint.TimeEfficency = _eoiBlueprint.TimeEfficency;

                BlueprintCalculator.Calculate(this);
            }
        }
Ejemplo n.º 4
0
 private void OnMarketHistoryUpdated()
 {
     BlueprintCalculator.Calculate(this);
 }