public CraftingTime GetRawCraftingTimePerUnit(double amount = 1) { var result = new CraftingTime(); result.AddTime(MaterialType, Converter.GetCraftingTime(MaterialType) * OneUnitFactor * amount); return(result); }
/// <summary> /// TODO to define different timer /// </summary> /// <returns></returns> public CraftingTime GetTotalCraftingTime(double amount = 1) { Tabs += " "; var time = new CraftingTime(); time.AddTime(GetRawCraftingTimePerUnit(amount)); // total time for one output unit foreach (var item in Converter.GetRequiredItemPerCrafting(MaterialType)) { SimpleDebugger.PrintLine(Tabs + "Create Material: " + item.Value + " of " + item.Key); var material = new Material(item.Key); // reduce time for one output unit and add total time time.AddTime(material.GetTotalCraftingTime(item.Value * OneUnitFactor)); } Tabs = Tabs.Remove(0, 3); return(time); }
public override int GetHashCode() { int hash = Name.GetHashCode(); if (Item != null) { hash ^= Item.GetHashCode(); } hash ^= CrewSkillId.GetHashCode(); hash ^= SkillOrange.GetHashCode(); hash ^= SkillYellow.GetHashCode(); hash ^= SkillGreen.GetHashCode(); hash ^= SkillGrey.GetHashCode(); if (Mat1 != null) { hash ^= Mat1.GetHashCode(); hash ^= Mat1Quantity; } if (Mat2 != null) { hash ^= Mat2.GetHashCode(); hash ^= Mat2Quantity.GetHashCode(); } if (Mat3 != null) { hash ^= Mat3.GetHashCode(); hash ^= Mat3Quantity.GetHashCode(); } if (Mat4 != null) { hash ^= Mat4.GetHashCode(); hash ^= Mat4Quantity.GetHashCode(); } if (Mat5 != null) { hash ^= Mat5.GetHashCode(); hash ^= Mat5Quantity.GetHashCode(); } hash ^= CraftingTime.GetHashCode(); hash ^= Subtype.GetHashCode(); if (Research1 != null) { hash ^= CraftingTimeT1.GetHashCode(); hash ^= Research1.GetHashCode(); hash ^= ResearchChance1.GetHashCode(); hash ^= ResearchQuantity1.GetHashCode(); } if (Research2 != null) { hash ^= CraftingTimeT2.GetHashCode(); hash ^= Research2.GetHashCode(); hash ^= ResearchChance2.GetHashCode(); hash ^= ResearchQuantity2.GetHashCode(); } if (Research3 != null) { hash ^= CraftingTimeT3.GetHashCode(); hash ^= Research3.GetHashCode(); hash ^= ResearchChance3.GetHashCode(); hash ^= ResearchQuantity3.GetHashCode(); } hash ^= MissionCost.GetHashCode(); if (MissionDescription != null) { hash ^= MissionDescription.GetHashCode(); } hash ^= MissionUnlockable.GetHashCode(); hash ^= MissionLight.GetHashCode(); hash ^= MissionLightCrit.GetHashCode(); hash ^= MissionDark.GetHashCode(); hash ^= MissionDarkCrit.GetHashCode(); hash ^= TrainingCost.GetHashCode(); hash ^= DisableDisassemble.GetHashCode(); hash ^= DisableCritical.GetHashCode(); hash ^= MissionFaction.GetHashCode(); if (MissionYieldDescription != null) { hash ^= MissionYieldDescription.GetHashCode(); } hash ^= Deprecated.GetHashCode(); return(hash); }