fix #434: delete the unreachable DebugPanel/DebugVM surface and the comments that advertised it
DebugPanel and DebugVM have not been constructible since Campaign V slice
V11 removed the ImGui frontend that hosted them: nothing in src/ ever
called their constructors, only a test did. Two consequences, both fixed
here — 35 environment reads inside them were unreachable, and roughly forty
XML doc comments across the diagnostics owners promised a runtime checkbox
that no longer exists. A flag documented as runtime-toggleable when it is
startup-only sends the next investigation down a path that cannot work.
Deleted DebugPanel.cs (340 lines), DebugVM.cs (548) and DebugVMTests.cs
(327). Corrected the surviving claims in PhysicsDiagnostics,
RenderingDiagnostics, CameraDiagnostics, PhysicsEngine and GameWindow to say
what is actually true: these flags are set from the environment at startup
or by direct assignment.
The one real dependant was CombatFeedbackSlot, whose binding target was
DebugVM. It now takes a plain Action<string>, which removes the dependency
without changing behavior — and makes visible that there is no behavior:
nothing binds the slot, so the combat refusals it carries ("No monster
target", "Enter melee or missile combat first") have been discarded all
along. Filed as #436 and pinned by a test, rather than papered over with an
invented chat message; the retail text and channel need the oracle first.
Deliberately untouched: F1's AcdreamToggleDebugPanel binding, which
GameplayInputCommandController consumes as a documented no-op so the key
does not fall through to a lower input scope; and the
DebugVmRenderFactsPublisher / DevToolsRuntimeSources chain, which is still
wired into production composition and deserves its own dead-code pass
instead of being pulled into this one.
Full hermetic suite 15,333 passed / 0 failed.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
e77dd7c413
commit
05bfe8d162
11 changed files with 129 additions and 1294 deletions
|
|
@ -66,27 +66,39 @@ internal interface ICombatFeedbackSink
|
|||
void Show(string message);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Routes combat refusal text ("No monster target") to whichever surface is
|
||||
/// bound to show it.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// #434: the bound target used to be the developer <c>DebugVM</c>, which
|
||||
/// Campaign V slice V11 left unreachable — nothing has constructed it since,
|
||||
/// so both messages below have been going nowhere. The binding target is now a
|
||||
/// plain delegate so this seam no longer depends on that dead class, but it
|
||||
/// still has no production binder: wiring it to the chat window, where retail
|
||||
/// puts this text, is #436.
|
||||
/// </remarks>
|
||||
internal sealed class CombatFeedbackSlot : ICombatFeedbackSink
|
||||
{
|
||||
private AcDream.UI.Abstractions.Panels.Debug.DebugVM? _viewModel;
|
||||
private Action<string>? _target;
|
||||
|
||||
public void Bind(AcDream.UI.Abstractions.Panels.Debug.DebugVM viewModel)
|
||||
public void Bind(Action<string> target)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(viewModel);
|
||||
if (_viewModel is not null && !ReferenceEquals(_viewModel, viewModel))
|
||||
ArgumentNullException.ThrowIfNull(target);
|
||||
if (_target is not null && !ReferenceEquals(_target, target))
|
||||
throw new InvalidOperationException(
|
||||
"Combat feedback is already bound to a developer view model.");
|
||||
_viewModel = viewModel;
|
||||
"Combat feedback is already bound to a presentation target.");
|
||||
_target = target;
|
||||
}
|
||||
|
||||
public void Unbind(AcDream.UI.Abstractions.Panels.Debug.DebugVM viewModel)
|
||||
public void Unbind(Action<string> target)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(viewModel);
|
||||
if (ReferenceEquals(_viewModel, viewModel))
|
||||
_viewModel = null;
|
||||
ArgumentNullException.ThrowIfNull(target);
|
||||
if (ReferenceEquals(_target, target))
|
||||
_target = null;
|
||||
}
|
||||
|
||||
public void Show(string message) => _viewModel?.AddToast(message);
|
||||
public void Show(string message) => _target?.Invoke(message);
|
||||
}
|
||||
|
||||
internal sealed class CombatAttackOperationsSlot
|
||||
|
|
|
|||
|
|
@ -134,8 +134,8 @@ public sealed class GameWindow :
|
|||
private DebugLineRenderer? _debugLines;
|
||||
// K-fix4 (2026-04-26): default OFF. The orange BSP / green cylinder
|
||||
// wireframes are noisy outdoors and confuse first-time users into
|
||||
// thinking they're a rendering bug. Ctrl+F2 toggles, the DebugPanel
|
||||
// → Diagnostics → "Toggle collision wires" button toggles too.
|
||||
// thinking they're a rendering bug. Ctrl+F2 toggles. (The DebugPanel
|
||||
// button that also toggled it is gone — #434.)
|
||||
private readonly AcDream.App.Rendering.WorldSceneDebugState
|
||||
_worldSceneDebugState = new();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue