public EoiDataContract(CorporationWebContract contract) { this.Id = contract.Id; _coporationWebContract = contract; _blueprint = EoiDataInterface.GetBlueprint(contract.BlueprintId); }
public EoiDataAsset(FileSystemDataAsset fileSystemDataAsset) { if (fileSystemDataAsset == null) { return; } _fileSystemAsset = fileSystemDataAsset; this.Id = fileSystemDataAsset.TypeId; _type = EoiDataInterface.GetTypeById(this.Id); }
public EoiDataBlueprint(StaticDataBlueprint staticBlueprint) { if (staticBlueprint == null) { Invalid = true; return; } _staticBlueprint = staticBlueprint; this.Id = staticBlueprint.Id; this.Products = new List <EoiDataType>(); var products = _staticBlueprint.GetProducts(); if (products == null) { this.Invalid = true; return; } foreach (var product in products) { var type = EoiDataInterface.GetType(product); if (type == null) { this.Invalid = true; return; } this.Products.Add(type); } this.Materials = new List <EoiDataType>(); var materials = _staticBlueprint.GetMaterials(); if (materials == null) { this.Invalid = true; return; } foreach (var material in materials) { var type = EoiDataInterface.GetType(material); if (type == null) { this.Invalid = true; return; } this.Materials.Add(type); } }
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); } } }
internal void InitializeInvention() { var inventionProducts = _staticBlueprint.GetInventionProducts(); if (inventionProducts != null) { foreach (var inventionProduct in inventionProducts) { var blueprint = EoiDataInterface.GetBlueprint(inventionProduct.Id); if (blueprint != null) { blueprint.Parent = this; } } } }