private static void UpgradeSteel(IItem weapon) { var item = ItemManager.GetItem <IItem>(weapon.ObjectId); item.Enchantment = SteelType.SetToSteelType(); item.MinDmg = SteelType.UpgradeMinDmg(item.MinDmg); item.MaxDmg = SteelType.UpgradeMaxDmg(item.MaxDmg); }
public Material(SteelType name, double fy, double fu, double e, double density) //TODO: ask team { Name = name; Fy = fy; Fu = fu; E = e; Density = density; }
public void IncreaseMass(SteelType type, double mass) { if (!_type2mass.ContainsKey(type)) { _type2mass[type] = mass; } else { _type2mass[type] += mass; } }
public SteelMaterial(string strengthClass, SteelType st, Beam bm) { SteelType = st; Bm = bm; if (MaterialYield.ContainsKey(strengthClass)) { StrengthClass = strengthClass; _fyk = MaterialYield[strengthClass]; } else { RhinoApp.WriteLine("Incorrect material name was chosen. B500B is used instead."); StrengthClass = "B500B"; _fyk = MaterialYield["B500B"]; } }
/// <summary> /// Сравнение двух экземпляров класса /// </summary> /// <param name="other"></param> /// <returns></returns> public bool Equals(MpProduct other) { if (Length.Equals(other.Length) && Width.Equals(other.Width) && Height.Equals(other.Height) && Diameter.Equals(other.Diameter) && Position.Equals(other.Position) && SteelDoc.Equals(other.SteelDoc) && SteelType.Equals(other.SteelType) && ItemTypesEqual(ItemTypes, other.ItemTypes) && // ItemTypes.Equals(other.ItemTypes) && Mass.Equals(other.Mass) && CMass.Equals(other.CMass) && WMass.Equals(other.WMass) && SMass.Equals(other.SMass)) { return(true); } return(false); }
/// <summary> /// Сравнение двух экземпляров класса /// </summary> /// <param name="other">Сравниваемый экземпляр <see cref="DbProduct"/></param> public bool Equals(DbProduct other) { if (other != null && Length.Equals(other.Length) && Width.Equals(other.Width) && Height.Equals(other.Height) && Diameter.Equals(other.Diameter) && Position == other.Position && SteelDoc.Equals(other.SteelDoc) && SteelType.Equals(other.SteelType) && ItemTypesEqual(ItemTypes, other.ItemTypes) && Mass.Equals(other.Mass) && CMass.Equals(other.CMass) && WMass.Equals(other.WMass) && SMass.Equals(other.SMass) && XmlDataEqual(Item, other.Item)) { return(true); } return(false); }