internal static void HelicoptersInit() { AddAttack.InitAttack(); AddObservation.InitObservation(); AddUtility.InitUtility(); }
public Description GetDescription() { Description res = new Description(); if (!Empty) { string desc; DescriptionItem d; List <DescriptionItem> constraints = new List <DescriptionItem>(); if (!canReformToFhalanx) { d = new DescriptionItem() { Name = LocalizedStrings.attention, Description = LocalizedStrings.weaponConstraint_cantReformPhalanx, ItPositiveDesc = canReformToFhalanx }; constraints.Add(d); } else { if (!canReformToPhalanxInFight) { d = new DescriptionItem() { Name = LocalizedStrings.attention, Description = LocalizedStrings.weaponConstraint_cantReformPhalanxInFight, ItPositiveDesc = canReformToPhalanxInFight }; constraints.Add(d); } } if (!canUseWithShield) { d = new DescriptionItem() { Name = LocalizedStrings.attention, Description = LocalizedStrings.weaponConstraint_cantUseShield, ItPositiveDesc = canUseWithShield }; constraints.Add(d); } List <DescriptionItem> stats = new List <DescriptionItem>(); d = new DescriptionItem() { Name = LocalizedStrings.mass, Description = Mass.ToString(StringFormats.floatNumber), ItPositiveDesc = true }; stats.Add(d); if (AttackDistance > 0) { d = new DescriptionItem() { Name = LocalizedStrings.attackDistance, Description = AttackDistance.ToString(StringFormats.floatNumber), ItPositiveDesc = true }; stats.Add(d); } if (AddAttack != 0) { d = new DescriptionItem() { Name = LocalizedStrings.attack, Description = AddAttack.ToString(StringFormats.floatSignNumberPercent) + LocalizedStrings.baseValue, ItPositiveDesc = AddAttack > 0 }; stats.Add(d); } if (AddDefence != 0) { d = new DescriptionItem() { Name = LocalizedStrings.defence, Description = AddDefence.ToString(StringFormats.floatSignNumberPercent) + LocalizedStrings.baseValue, ItPositiveDesc = AddDefence > 0 }; stats.Add(d); } if (AddDefenceHalfSector != 0) { d = new DescriptionItem() { Name = LocalizedStrings.defenceHalfSector, Description = AddDefenceHalfSector.ToString(StringFormats.floatSignNumberPercent) + LocalizedStrings.baseValue, ItPositiveDesc = AddDefenceHalfSector > 0 }; stats.Add(d); } if (AddSpeed != 0) { d = new DescriptionItem() { Name = LocalizedStrings.speed, Description = AddSpeed.ToString(StringFormats.floatSignNumberPercent) + LocalizedStrings.baseValue, ItPositiveDesc = AddSpeed > 0 }; stats.Add(d); } if (AddAcceleretion != 0) { d = new DescriptionItem() { Name = LocalizedStrings.acceleration, Description = AddAcceleretion.ToString(StringFormats.floatSignNumberPercent) + LocalizedStrings.baseValue, ItPositiveDesc = AddAcceleretion > 0 }; stats.Add(d); } if (AddRotationSpeed != 0) { d = new DescriptionItem() { Name = LocalizedStrings.rotationSpeed, Description = AddRotationSpeed.ToString(StringFormats.floatSignNumberPercent) + LocalizedStrings.baseValue, ItPositiveDesc = AddRotationSpeed > 0 }; stats.Add(d); } if (ChargeImpact != 0) { d = new DescriptionItem() { Name = LocalizedStrings.chargeImpact, Description = ChargeImpact.ToString(StringFormats.floatSignNumberPercent) + LocalizedStrings.baseValue, ItPositiveDesc = ChargeImpact > 0 }; stats.Add(d); } if (ChargeDeflect != 0) { d = new DescriptionItem() { Name = LocalizedStrings.chargeDeflect, Description = ChargeDeflect.ToString(StringFormats.floatSignNumberPercent) + LocalizedStrings.baseValue, ItPositiveDesc = ChargeDeflect > 0 }; stats.Add(d); } if (Armour > 0) { d = new DescriptionItem() { Name = LocalizedStrings.armour, Description = Armour.ToString(StringFormats.floatNumber), ItPositiveDesc = true }; stats.Add(d); } if (Damag.BaseDamage > 0) { d = new DescriptionItem() { Name = LocalizedStrings.baseDamage, Description = Damag.BaseDamage.ToString(StringFormats.floatNumber), ItPositiveDesc = true }; stats.Add(d); } if (Damag.ArmourDamage > 0) { d = new DescriptionItem() { Name = LocalizedStrings.armourDamage, Description = Damag.ArmourDamage.ToString(StringFormats.floatNumber), ItPositiveDesc = true }; stats.Add(d); } if (MissileBlock != 0) { d = new DescriptionItem() { Name = LocalizedStrings.missileBlock, Description = MissileBlock.ToString(StringFormats.floatNumberPercent), ItPositiveDesc = MissileBlock > 0 }; stats.Add(d); } if (AddChargeDamage != 0) { d = new DescriptionItem() { Name = LocalizedStrings.chargeDamage, Description = AddChargeDamage.ToString(StringFormats.floatSignNumberPercent) + LocalizedStrings.baseValue, ItPositiveDesc = AddChargeDamage > 0 }; stats.Add(d); } EquipmentStats st = this; res.Condition = new Description.ConditionsInfo() { Name = Tools.Extensions.GetNameLocalise(ItemDurability), Value = (Description.ConditionsInfo.Conditions)Enum.GetNames(typeof(Durability)).ToList().FindIndex((s) => { return(Enum.GetName(typeof(Durability), st.ItemDurability) == s); }) }; res.Cost = new Description.CostInfo() { CostPerOne = Cost }; res.Constraints = constraints.ToArray(); res.Stats = stats.ToArray(); } return(res); }