Skip to content

feat(vision): radar coverage and the minimap come from the building (#54, Sprint 16.5) - #77

Merged
cubetribe merged 2 commits into
mainfrom
feat/16-5-radar
Aug 9, 2026
Merged

cubetribe merged 2 commits into
mainfrom
feat/16-5-radar

Conversation

@cubetribe

Copy link
Copy Markdown
Collaborator

Was

Sprint 16.5 (Beta-Issue #54, C3/D-096) — zwei Wirkungen, beide vom Gebäude abgeleitet:

  1. Die Minimap hängt am Radar. MinimapHud existiert — Panel und Trefferfläche — nur noch, solange der lokale Slot ein fertiges Radar besitzt (ConstructionSystem.HasFinishedBuilding, eine gemeinsame Abfrage für Zeichnen und Hit-Test, damit beide nie auseinanderlaufen). Der Bauknopf sagt es im Klartext: beim Überfahren des Radar-Knopfs steht in der Statuszeile „Radar: schaltet die Minimap frei — ohne Radar keine Karte" (auch bei verfügbarem Knopf; Blocker-Gründe haben weiter Vorrang).
  2. Radar-Abdeckung kommt vom Gebäude. FogOfWarSystem.GetRadarSignatures: nur ein fertiges Radargebäude strahlt (eigene Sichtweite × RadarRadiusMultiplier = 2); Baustellen, zerstörte und alle anderen Einheiten strahlen nichts. Die Vor-16.5-Regel (jede Einheit × 2) ist ersatzlos weg. Die Pings werden erstmals von der Präsentation konsumiert: MinimapHud zeichnet sie als signal-orange Punkte — ein Zeichen, kein Ziel (RadarSignature trägt weiter keine EntityId).

FogOfWarSystem.GetTeamView bleibt unverändert — Vertragsfläche des Einheitenstrangs (CombatSystem).

Architektur-Entscheidung (handwerklich, im PR notiert)

FogOfWarSystem bekommt das ConstructionSystem als Pflicht-Konstruktorparameter (Positionsparameter direkt nach EntityManager): das Placement-Register ist die einzige Quelle, die fertig von Baustelle/zerstört unterscheidet. Der Compiler hat alle 21 Host- und Rig-Stellen aufgezählt — MatchRunner, Program.cs, zwei Szenarien und alle Test-Hosts sind angepasst; Rigs ohne bisheriges Construction bauen ein unregistriertes Economy/Construction-Paar (die Bindung lebt im Konstruktor, nicht im Tick). Lesezugriff nur (IsCompletedPlacement).

Test-Geometrie (ein Fang, der es wert ist zu lesen)

Das Radargebäude trägt auch normale Sicht (DefaultSightRadius 10) — ein Ping-Ziel muss sich daher vor beiden Radien verstecken: außerhalb Sicht 10 und Beobachter-Sicht 5, aber innerhalb der Abdeckung 20. Die drei Radar-Tests (FogOfWarSystemTests, CombatSystemTests.RadarPingOnly) legen die Positionen entsprechend; ein neuer Test pinnt „kein fertiges Radar → gar keine Abdeckung". EditMode-Spiegel synchron.

Baseline-Erwartung

Keine. Die Pings sind eine abgeleitete Ansicht über committed sight + aktuelle Positionen — nicht Teil des autorisierten Zustands (FogOfWarSystem.ExecuteTick unverändert, kein Formatfeld berührt). Golden-Byte-Tests sollten hier grün bleiben; falls doch etwas rot wird, ist es ein Befund, keine Erwartung.

Nachweis (ehrlich)

  • Kein lokaler dotnet test-Lauf möglich — Nachweis über die CI (SDK-Pin 8.0.318 vs. installiert 10.0.302).
  • Spiel-Sicht (steht aus): Minimap weg zu Spielbeginn, Radar bauen → Minimap + Pings da, Radar verlieren → weg. Presentation läuft in keiner CI; ich kann die Runde nicht selbst sehen. Der Verlust der bisher immer vorhandenen Minimap ist in D-096 einkalkuliert und am Bauknopf erklärt.

Changelog

Eine Zeile unter [Unreleased] → „#54: Das Radar wird ein Gebäude (C3/D-096)".

)

Sprint 16.5, C3/D-096, two effects both derived from the building:

- GetRadarSignatures: only a COMPLETED Radar building radiates (its own
  sight radius x RadarRadiusMultiplier). FogOfWarSystem gains the
  construction system as a REQUIRED constructor dependency (placement
  register is the only source that tells completed from site/corpse) -
  every host and test rig updated, the compiler enumerated them. The
  pre-16.5 every-unit-x2 rule is gone. GetTeamView untouched (units
  track contract surface). No baseline impact: pings are a derived
  view, not authoritative state.
- MinimapHud: the whole panel - draw AND hit area - exists only while
  the local slot owns a completed Radar (HasFinishedBuilding, one read
  shared by both so they cannot disagree). Radar pings are drawn as
  signal-orange dots: first live consumer of GetRadarSignatures.
- BuildMenuHud: the radar button says in plain text what it unlocks
  (status line on hover, alongside the blocker reasons).

Tests: FogOfWarSystemTests/CombatSystemTests rigs build the placement
register; the radar tests now spawn a completed Radar placement and
hide ping targets from BOTH radii (the building also contributes plain
sight radius 10 - caught while writing the geometry). New test: no
completed Radar, no coverage at all. EditMode mirrors kept in sync.
@cubetribe
cubetribe merged commit 5a5e218 into main Aug 9, 2026
7 checks passed
@cubetribe
cubetribe deleted the feat/16-5-radar branch August 9, 2026 18:31
cubetribe added a commit that referenced this pull request Aug 10, 2026
…int 16.6) (#78)

* feat(economy): low power takes radar first and halves repair (C4)

Sprint 16.6, D-030/Economy.md shutdown order:

- Radar falls FIRST at a deficit: FogOfWarSystem.GetRadarSignatures
  returns nothing while the team's balance is low power. The economy
  becomes the third required constructor dependency (the compiler
  enumerated every host and rig again). MinimapHud goes dark with it -
  same balance, same read as the 16.5 radar gate.
- Production and construction keep the exact 0.5 Q16.16 speed penalty
  (existing).
- Repair halves exactly: 10 -> 5 HP/tick under low power (Economy.md
  repair rule; 10/2 is exact, no rounding).
- NOT included, by design: the defense shutdown. Whether a tower fires
  is CombatSystem's call alone, and Simulation/Combat/ has no notion of
  power - that input would be units-track terrain. Goes to 13B as a
  finding (Issue #70).

This branch REPLICATES the Sprint 16.5 state (PR #77: FogOfWarSystem
construction dependency, MinimapHud radar gate, BuildMenuHud radar
hint, all host/rig signature updates) as its base, because 16.6 builds
directly on the 16.5 radar functions and PR-only flow forbids stacking
on a local branch. Identical hunks in both merge directions: whichever
of #77 and this PR lands first, the other merges clean.

New tests: pings stop at deficit and resume on recovery (Fog), repair
halves exactly under low power (Construction). EditMode mirrors synced.
No baseline impact: low-power effects read committed balances; the
decay of 16.4 is what moves state, and that lands with #73.

* fix(test): der zweite Kampf-Fixture reicht economy weiter, nicht factions

Der Wiedergabe-Fixture in CombatSystemTests nennt seine Wirtschaft economy;
beim Nachziehen der 16.5-Signatur blieb an einer Stelle der Name des ersten
Fixtures (factions) stehen. Die CI brach mit CS0103 ab, bevor ein Test lief.
Beide Spiegel gleich gezogen.

Co-Authored-By: Claude Opus 5 <[email protected]>

* test(construction): keep normal repair fixture powered

---------

Co-authored-by: Claude Opus 5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant