MunitionPartsTests: ShipSums reads per-channel light from VisibilitySources, SignatureOn being retired

The merged tree needs this: loot-1 added the SignatureOn reader after the cut's base.
Does not build without it; builds with it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-13 02:05:46 +02:00
commit 75d97af1ef

View file

@ -301,7 +301,7 @@ public sealed class MunitionPartsTests : IDisposable
private static string ShipSums(Ship s)
{
var e = s.Envelope;
var channels = string.Join(",", Enum.GetValues(typeof(SignatureChannel)).Cast<SignatureChannel>().Select(c => $"{c}={s.SignatureOn(c):0.####}"));
var channels = string.Join(",", Enum.GetValues(typeof(SignatureChannel)).Cast<SignatureChannel>().Select(c => $"{c}={s.VisibilitySources.Values.Where(v => v.Channel == c).Sum(v => v.Strength):0.####}"));
var sensors = string.Join(",", s.GetBehaviors<Sensor>().Select(b => b.Data.GetType().Name));
return $"env F{e.Forward:0.###} R{e.Reverse:0.###} L{e.Left:0.###} Ri{e.Right:0.###} CW{e.Clockwise:0.###} CCW{e.CounterClockwise:0.###} " +
$"vis={s.Visibility:0.####} sources={s.VisibilitySources.Count} {channels} thrusters={s.GetBehaviors<Thruster>().Count()} thrust={s.GetBehaviors<Thruster>().Sum(t => t.Thrust):0.###} sensors=[{sensors}]";