probe (temporary)
This commit is contained in:
parent
be198593cc
commit
b708d51617
1 changed files with 13 additions and 2 deletions
|
|
@ -118,7 +118,7 @@ public sealed class PickupTests : IDisposable
|
|||
RocheLimit = new ExponentialCurve { Constant = 2f }
|
||||
};
|
||||
var sunOrbit = cache.Upsert(new OrbitData { FixedPosition = float2(-50, 0) }).Key;
|
||||
var planetOrbit = cache.Upsert(new OrbitData { Parent = new CultRecordRef<OrbitData>(sunOrbit), Distance = 60f, Phase = .3f }).Key;
|
||||
var planetOrbit = cache.Upsert(new OrbitData { Parent = new CultRecordRef<OrbitData>(sunOrbit), Distance = 90f, Phase = .9f }).Key;
|
||||
pack.Radius = 5000f;
|
||||
pack.Mass = 10000f;
|
||||
pack.Orbits.Add(new CultRecordRef<OrbitData>(sunOrbit));
|
||||
|
|
@ -290,11 +290,22 @@ public sealed class PickupTests : IDisposable
|
|||
ship.TractorCommand = 1;
|
||||
for (var tick = 1; tick <= 150; tick++) lab.Zone.Update(1 / 60f);
|
||||
Assert.NotEmpty(seen);
|
||||
Assert.True(abs(lab.Zone.GetHeight(float2(40, 0), lab.Zone.ExactTime) - lab.Zone.GetHeight(float2(40, 0), start)) > .01f, "the wells did not move");
|
||||
Assert.True(abs(lab.Zone.GetHeight(float2(40, 0), lab.Zone.ExactTime) - lab.Zone.GetHeight(float2(40, 0), start)) > .01f, $"the wells did not move: {lab.Zone.GetHeight(float2(40, 0), lab.Zone.ExactTime)} vs {lab.Zone.GetHeight(float2(40, 0), start)}");
|
||||
Assert.All(seen, s => Assert.Equal(lab.Zone.GetHeight(s.Event.TargetPosition.xz, s.Time) - 1.5f, s.Event.TargetPosition.y, 3));
|
||||
Assert.All(seen, s => Assert.True(abs(s.Event.TargetPosition.y - (-1.5f)) > 1f, "the grab point sits on the bare layer, the field dropped"));
|
||||
}
|
||||
|
||||
|
||||
[Fact]
|
||||
public void ZProbe()
|
||||
{
|
||||
var lab = Build(Beam(), wells: true);
|
||||
var t0 = lab.Zone.ExactTime;
|
||||
var o = new System.Text.StringBuilder();
|
||||
for (var i = 0; i < 3; i++) { foreach (var p in new[] { float2(0,0), float2(40,0) }) o.Append($"[t+{lab.Zone.ExactTime - t0:0.0} {p.x}: {lab.Zone.GetHeight(p, lab.Zone.ExactTime)}] "); for (var k = 0; k < 60; k++) lab.Zone.Update(1/60f); }
|
||||
Assert.Fail(o.ToString());
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void GrabEventsNameTheFloatingItem()
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue