public static IEnumerable <EVEMaterial> ProductionBaseMaterials(string typeName) { invType dcType = TypesHelper.GetType(typeName); Dictionary <int, EVEMaterial> matInfo = new Dictionary <int, EVEMaterial>(); foreach (invTypeMaterial m in TypesHelper.GetTypeMaterials(dcType)) { matInfo[m.materialTypeID] = new EVEMaterial(EVECache.GetItem(m.materialTypeID), m.quantity, 1.0, false); } invBlueprintType bpType = TypesHelper.GetBlueprintType(dcType); if (bpType != null) { foreach (ramTypeRequirement m in TypesHelper.GetRamTypeRequirements(bpType).Where(x => x.activityID == 1)) { if (m.recycle.Value) { IEnumerable <EVEMaterial> subMats = ProductionBaseMaterials(TypesHelper.GetType(m.requiredTypeID).typeName); foreach (EVEMaterial subMat in subMats) { if (matInfo.ContainsKey(subMat.item.TypeID)) { matInfo[subMat.item.TypeID].quantity -= subMat.quantity; } } } } } return(matInfo.Values.Where(x => x.quantity > 0).OrderByDescending(x => x.quantity).ToList()); }
public static decimal GetProductionTime(string typeName, int PE) { invBlueprintType blueprint = TypesHelper.GetBlueprintType(TypesHelper.GetType(typeName)); decimal baseProdTime = (decimal)blueprint.productionTime.Value; decimal prodMod = (decimal)blueprint.productivityModifier.Value; if (PE < 0) { return(baseProdTime * 0.8m * (1 - (prodMod / baseProdTime) * (PE - 1))); } else { return(baseProdTime * 0.8m * (1 - (prodMod / baseProdTime) * (PE / (1 + PE)))); } }
public static IEnumerable <EVEMaterial> ProductionExtraMaterials(string typeName) { invType dcType = TypesHelper.GetType(typeName); List <EVEMaterial> matInfo = new List <EVEMaterial>(); invBlueprintType bpType = TypesHelper.GetBlueprintType(dcType); if (bpType != null) { foreach (ramTypeRequirement m in TypesHelper.GetRamTypeRequirements(bpType).Where(x => x.activityID == 1)) { matInfo.Add(new EVEMaterial(EVECache.GetItem(m.requiredTypeID), m.quantity.Value, m.damagePerJob.Value, true)); } } return(matInfo); }
public static IEnumerable <EVEMaterial> GetInventionRequirements(string t2ItemName) { List <EVEMaterial> result = new List <EVEMaterial>(); invType t1type = TypesHelper.GetMeta0Type(t2ItemName); invBlueprintType bpType = TypesHelper.GetBlueprintType(t1type); IEnumerable <ramTypeRequirement> ramReqs = TypesHelper.GetRamTypeRequirements(bpType).Where(x => x.activityID == 8); foreach (ramTypeRequirement r in ramReqs) { invType reqType = TypesHelper.GetType(r.requiredTypeID); EVEMaterial newMat = new EVEMaterial(EVECache.GetItem(reqType), r.quantity.Value, r.damagePerJob.Value, true); if (reqType.groupID == 716) { newMat.damage = 0; } result.Add(newMat); } return(result); }
public static EVEBlueprint GetBlueprint(string productTypeName) { EVEBlueprint blueprint = new EVEBlueprint(); if (productTypeName != null) { blueprint.Product = EVECache.GetItem(productTypeName); } var x = TypesHelper.GetBlueprintType(blueprint.Product.TypeID); blueprint.Blueprint = EVECache.GetItem(x.blueprintTypeID); blueprint.MaxRuns = x.maxProductionLimit.Value; blueprint.BaseInventionTime = x.researchTechTime.Value; blueprint.BaseProductionTime = x.productionTime.Value; blueprint.MaterialEfficiency = -4; blueprint.ProductionEfficiency = -4; blueprint.NumRuns = blueprint.MaxRuns / 10; return(blueprint); }