Radar: nearby_objects every second and dungeon_map per dungeon landblock

start_radar/stop_radar from the backend drive it, as before. nearby_objects
keeps the original's shape: map coordinates on the surface, landblock-local
raw positions with zero map coordinates in a dungeon, ids as signed ints, the
same eight object classes, no wielded items or self. dungeon_map is built the
original's way from the landblock's cells (x a multiple of 10, whole metres,
6-metre floors, rotation = the orientation's stored W) and sent once per
landblock per session; the cells come through a small reader that the
plugin API's dungeon-cell data will fill (until then the map is not sent).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Erik 2026-09-25 12:28:07 +02:00
parent 0efef6170c
commit ec22348ebc
6 changed files with 425 additions and 0 deletions

View file

@ -43,3 +43,12 @@ public sealed class FakeNetwork : INetworkAutomation
return AcceptImports;
}
}
/// <summary>A dungeon-map surface whose sealed landblocks a test names.</summary>
public sealed class FakeDungeonMap : IDungeonMapAutomation
{
public HashSet<uint> SealedLandblocks { get; } = [];
public bool IsSealedDungeon(uint cellId) =>
(cellId & 0xFFFFu) >= 0x100u && SealedLandblocks.Contains(cellId & 0xFFFF0000u);
}