Mining index: the index alone decides reach; tests pin what Stryker found loose

BeltTargets drops its own reach skip (TargetRegion.CanHold owns it) and an
empty-belt guard AsteroidBelt already makes unreachable. Tests add an
off-centre sun, whole-belt searches across the antipode, cost after time
passes, a late short step that re-keys nothing, and an entity search off the
origin.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-03 15:25:32 +02:00
commit a4e8e14718
3 changed files with 50 additions and 27 deletions

View file

@ -100,7 +100,6 @@ public sealed class BeltTargets : ITargetProvider
public void Regions(in TargetSearch search, List<TargetRegion> into)
{
if (_bands.Length == 0) return;
var time = _zone.ExactTime;
var centre = _zone.GetOrbitPosition(_zone.Orbits[_data.Orbit.Key].Data.Parent.Key);
var offset = search.Position - centre;
@ -171,7 +170,6 @@ public sealed class BeltTargets : ITargetProvider
};
sector.Range(distance, turn, out var nearest, out var farthest);
nearest = max(0f, nearest - slack);
if (nearest > search.Reach) continue;
sector.Bearing(search.Position - centre, out var bearing, out var bearingHalf);
var light = 0f;
foreach (var sun in _zone.Suns())