public WeaponModifierInfoWrapper(WeaponModifierInfo other) { TargetClass = other.TargetClass; ClassOperator = other.ClassOperator; Modifier = other.Modifier; Amount = other.Amount; }
protected void OutputForWeapons(EntityTypeCollection entityTypeCollection, EntityTypeAttributes entityTypeAttributes, string[] selectedWeapons, bool dps = false) { using (BeginScope("weapons")) { WeaponAttributes[] weaponAttributes = entityTypeAttributes.GetAll <WeaponAttributes>(); for (int i = 0; i < weaponAttributes.Length; ++i) { WeaponAttributes w = weaponAttributes[i]; if (selectedWeapons == null || Array.IndexOf(selectedWeapons, w.Name) >= 0) { using (BeginScope(w.Name)) { Print($"damageType: {w.DamageType}"); Print($"dmg: {w.BaseDamagePerRound}"); Print($"packets: {w.DamagePacketsPerShot}"); Print($"excludeFromHighGround: {w.ExcludeFromHeightAdvantage}"); Print($"lineOfSightRequired: {w.LineOfSightRequired}"); Print($"friendlyFireDamageScalar: {w.FriendlyFireDamageScalar}"); Print($"leadsTarget: {w.LeadsTarget}"); Print($"windUp: {w.WindUpTimeMS}"); Print($"windDown: {w.WindDownTimeMS}"); Print($"rof: {w.RateOfFire}"); Print($"burstMin: {w.BurstPeriodMinTimeMS}"); Print($"burstMax: {w.BurstPeriodMaxTimeMS}"); Print($"numBursts: {w.NumberOfBursts}"); Print($"cooldown: {w.CooldownTimeMS}"); Print($"reload: {w.ReloadTimeMS}"); Print($"aoe: {w.AreaOfEffectRadius}"); Print($"falloff: {Enum.GetName(typeof(AOEFalloffType), w.AreaOfEffectFalloffType)}"); using (BeginScope($"ranges")) { foreach (var r in w.Ranges) { using (BeginScope(Enum.GetName(typeof(WeaponRange), r.Range))) { Print($"distance: {r.Distance}"); Print($"accuracy: {r.Accuracy}"); } } } if (!dps) { using (BeginScope($"turret")) { Print($"fieldOfView: {w.Turret.FieldOfView}"); Print($"fieldOfFire: {w.Turret.FieldOfFire}"); Print($"rotationSpeed: {w.Turret.RotationSpeed}"); } if (w.Modifiers.Length > 0) { using (BeginScope($"modifiers")) { for (int j = 0; j < w.Modifiers.Length; ++j) { WeaponModifierInfo modifierInfo = w.Modifiers[j]; using (BeginScope(j.ToString())) { Print($"targetClass: {modifierInfo.TargetClass}"); Print($"classOperator: {modifierInfo.ClassOperator}"); Print($"modifierType: {modifierInfo.Modifier}"); Print($"amount: {modifierInfo.Amount}"); } } } } if (w.StatusEffectsSets.Length > 0) { Print($"statusEffectsExcludeTargetType: {w.StatusEffectsExcludeTargetType}"); Print($"statusEffectsTargetAlignment: {w.StatusEffectsTargetAlignment}"); using (BeginScope("statusEffectSets")) { for (int j = 0; j < w.StatusEffectsSets.Length; ++j) { for (int k = 0; k < w.StatusEffectsSets[j].StatusEffects.Length; ++k) { using (BeginScope(w.StatusEffectsSets[j].StatusEffects[k])) { EntityTypeAttributes seEntityTypeAttributes = entityTypeCollection.GetEntityType(w.StatusEffectsSets[j].StatusEffects[k]); StatusEffectAttributes[] statusEffectAttributes = seEntityTypeAttributes.GetAll <StatusEffectAttributes>(); if (statusEffectAttributes.Length > 0) { OutputForStatusEffect(statusEffectAttributes[0]); } } } } } } } WeaponDPSInfo weaponDPSInfo = new WeaponDPSInfo(w); using (BeginScope("dpsInfo")) { Print($"avgShots: {weaponDPSInfo.AverageShotsPerBurst}"); Print($"trueROF: {weaponDPSInfo.TrueROF}"); Print($"sequenceDuration: {weaponDPSInfo.SequenceDuration}"); if (dps) { using (BeginScope("dpsVsArmor")) { int[] armorVals = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 15, 18, 21, 25, 50, 75, 100 }; for (int j = 0; j < armorVals.Length; ++j) { using (BeginScope(armorVals[j].ToString())) { double armorDPS = weaponDPSInfo.ArmorDPS(armorVals[j]); Print($"dpsBeforeAccuracy: {armorDPS}"); using (BeginScope("accuracyDps")) { Dictionary <WeaponRange, double> rangeDPS = weaponDPSInfo.RangeDPS(armorDPS); foreach (RangeBasedWeaponAttributes r in w.Ranges) { Print($"{Enum.GetName(typeof(WeaponRange), r.Range)}: {rangeDPS[r.Range]}"); } } } } } } else { double armorDPS = weaponDPSInfo.ArmorDPS(0); Print($"dpsBeforeAccuracy: {armorDPS}"); using (BeginScope("accuracyDps")) { Dictionary <WeaponRange, double> rangeDPS = weaponDPSInfo.RangeDPS(armorDPS); foreach (RangeBasedWeaponAttributes r in w.Ranges) { Print($"{Enum.GetName(typeof(WeaponRange), r.Range)}: {rangeDPS[r.Range]}"); } } } } } } } } }