void UpdateDebugLabels() { debugString.Length = 0; using (var team = TargetDatabase.GetEnumerator()) while (team.MoveNext()) { debugString.Append($"Team {team.Current.Key} targets:"); debugString.Append(Environment.NewLine); foreach (TargetInfo targetInfo in team.Current.Value) { if (targetInfo) { if (!targetInfo.Vessel) { debugString.Append($"- A target with no vessel reference."); debugString.Append(Environment.NewLine); } else { debugString.Append($"- {targetInfo.Vessel.vesselName} Engaged by {targetInfo.TotalEngaging()}"); debugString.Append(Environment.NewLine); } } else { debugString.Append($"- null target info."); debugString.Append(Environment.NewLine); } } } debugString.Append(Environment.NewLine); debugString.Append($"Heat Signature: {GetVesselHeatSignature(FlightGlobals.ActiveVessel):#####}"); debugString.Append(Environment.NewLine); debugString.Append($"Radar Signature: " + RadarUtils.GetVesselRadarSignature(FlightGlobals.ActiveVessel).radarModifiedSignature); debugString.Append(Environment.NewLine); debugString.Append($"Chaff multiplier: " + RadarUtils.GetVesselChaffFactor(FlightGlobals.ActiveVessel)); debugString.Append(Environment.NewLine); debugString.Append($"ECM Jammer Strength: " + FlightGlobals.ActiveVessel.gameObject.GetComponent <VesselECMJInfo>()?.jammerStrength); debugString.Append(Environment.NewLine); debugString.Append($"ECM Lockbreak Strength: " + FlightGlobals.ActiveVessel.gameObject.GetComponent <VesselECMJInfo>()?.lockBreakStrength); debugString.Append(Environment.NewLine); }
void UpdateDebugLabels() { debugString.Length = 0; debugString.Append($"Team A's targets:"); debugString.Append(Environment.NewLine); foreach (TargetInfo targetInfo in TargetDatabase[BDArmorySetup.BDATeams.A]) { if (targetInfo) { if (!targetInfo.Vessel) { debugString.Append($"- A target with no vessel reference."); debugString.Append(Environment.NewLine); } else { debugString.Append($"- {targetInfo.Vessel.vesselName} Engaged by {targetInfo.numFriendliesEngaging}"); debugString.Append(Environment.NewLine); } } else { debugString.Append($"- null target info."); debugString.Append(Environment.NewLine); } } debugString.Append($"Team B's targets:"); debugString.Append(Environment.NewLine); foreach (TargetInfo targetInfo in TargetDatabase[BDArmorySetup.BDATeams.B]) { if (targetInfo) { if (!targetInfo.Vessel) { debugString.Append($"- A target with no vessel reference."); debugString.Append(Environment.NewLine); } else { debugString.Append($"- {targetInfo.Vessel.vesselName} Engaged by {targetInfo.numFriendliesEngaging}"); debugString.Append(Environment.NewLine); } } else { debugString.Append($"- null target info."); debugString.Append(Environment.NewLine); } } debugString.Append(Environment.NewLine); debugString.Append($"Heat Signature: {GetVesselHeatSignature(FlightGlobals.ActiveVessel):#####}"); debugString.Append(Environment.NewLine); debugString.Append($"Radar Signature: " + RadarUtils.GetVesselRadarSignature(FlightGlobals.ActiveVessel).radarModifiedSignature); debugString.Append(Environment.NewLine); debugString.Append($"Chaff multiplier: " + RadarUtils.GetVesselChaffFactor(FlightGlobals.ActiveVessel)); debugString.Append(Environment.NewLine); debugString.Append($"ECM Jammer Strength: " + FlightGlobals.ActiveVessel.gameObject.GetComponent <VesselECMJInfo>()?.jammerStrength); debugString.Append(Environment.NewLine); debugString.Append($"ECM Lockbreak Strength: " + FlightGlobals.ActiveVessel.gameObject.GetComponent <VesselECMJInfo>()?.lockBreakStrength); debugString.Append(Environment.NewLine); }