fix(ui,runtime): OP4 review fixes — live re-seed, enable-gating, Combat panel re-point, universal timestamps
Both OP4 reviews converged on one headline bug (Character-tab rows never re-read live server truth after their pre-login constructor-word seed) plus overlapping MUST-FIXes. All ten converged/consolidated findings land here: MUST-FIX: - BoolOptionRow.SaveCurrentValue now re-reads its live binding (retail's GetValue()-into-SaveCurrentValue) on every OnShown — panel open, tab switch in, initial activation — instead of trusting the pre-login constructor word it was built with. Reset/tab-switch can now only restore values that were actually live at the last show. LockUI's host.Root.UiLocked one-shot mount seed now also converges on every PlayerDescription via the existing OnCharacterOptionsChanged hook. - Apply/Reset are wired to OptionPage.OnOptionChanged in production (Ghosted when nothing changed, Normal when dirty, run once at bind so both start disabled per retail's PostInit); Defaults stays ungated. - The Combat panel's three LEDs (Repeat Attacks/Auto Target/Keep in View) now read/write the same RuntimeCharacterOptionsState seam the Character tab uses instead of a disconnected client-local GameplaySettings copy — closes the "two writable copies" divergence. The three now-orphaned GameplaySettings fields and RuntimeSettingsController's mirror properties/SetCombatGameplay are deleted outright; the headless host's hardcoded AutoRepeatAttack/AutoTarget now read the live option bit. - RuntimeSettingsController.SetUiLocked's convergence guard now compares against the last value actually applied to the runtime target instead of the persisted GameplaySettings.LockUI snapshot, which could already match a server-derived request without ever having been pushed. SHOULD-FIX: - DisplayTimeStamps now prefixes every chat producer (ChatLog.Append is the one seam all of them funnel through), not just AddText's own callers — heard speech, emotes, Turbine channels, and combat text were previously missed. The prefix format escapes its colons and forces InvariantCulture instead of the culture-dependent TimeSeparator placeholder. - sky.frag now honors uFogParams.w (fog mode) like the mesh/terrain shaders, so Disable Distance Fog stops the sky dome's horizon band from blending toward fog color too. - Corrected the "byte-verified" overclaim on the timestamp format string doc comment (BN-sourced, wire doc U6) and the AP-194 anchor-column class-name typo; the RunAsDefaultMovement doc comments now cite retail's actual acclient.h enumerator name. - Added: DispatcherMovementInputSource's option x modifier truth table (incl. || AutoRunActive with the option off), the per-page Apply/Reset enable-gate tests, a real checkbox.OnClick/ToggleBehavior-driven click test, and hash-pins for the six header string keys. - Gate script step 8 corrected for the logout-flush false-failure (closing the panel before relogging is load-bearing); a new step documents the enable-gate sequence and the Combat-panel/Character-tab cross-check. Register: AP-196 (the Group-C default-source change + GameplaySettings retirement) and AP-197 (the ignored per-character timestamp format override) filed in this commit. Full Release suite: 13,044 passed / 4 skipped / 0 failed (was 13,008/4/0; net +36 tests from new coverage and legitimate assertion updates from the GameplaySettings retirement). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
85afaae5fd
commit
bc43fb1d1d
36 changed files with 923 additions and 220 deletions
|
|
@ -1,6 +1,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Globalization;
|
||||
using System.Threading;
|
||||
|
||||
namespace AcDream.Core.Chat;
|
||||
|
|
@ -45,6 +46,27 @@ public sealed class ChatLog
|
|||
_maxEntries = maxEntries;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OP4 review-fix round (2026-08-11, SHOULD-FIX S1): retail
|
||||
/// <c>PlayerOption DisplayTimeStamps</c> — <c>ClientSystem::
|
||||
/// AddTextToScroll @0x00563C50</c> — prefixes EVERY transcript line
|
||||
/// with the timestamp, not just the subset that happens to route
|
||||
/// through <c>RuntimeCommunicationState.AddText</c>. Moved HERE
|
||||
/// (from AddText) because <see cref="Append"/> is the ONE seam every
|
||||
/// chat producer (<see cref="OnLocalSpeech"/>, <see cref="OnEmote"/>,
|
||||
/// <see cref="OnSoulEmote"/>, <see cref="OnPlayerKilled"/>,
|
||||
/// <see cref="OnChannelBroadcast"/>, <see cref="OnTellReceived"/>,
|
||||
/// <see cref="OnSystemMessage"/>, <see cref="OnPopup"/>,
|
||||
/// <see cref="OnCombatLine"/>, <see cref="OnSelfSent"/>) funnels
|
||||
/// through — AddText's own callers (ServerMessage/WeenieError) were a
|
||||
/// strict subset, so heard speech, emotes, Turbine channels, and
|
||||
/// combat text never gained the prefix. The transient SpewBox
|
||||
/// (<c>RetailLogTextType.ClientLocal</c>) never touches this class at
|
||||
/// all, so it stays exempt automatically — matching retail's own
|
||||
/// exemption without a special case here.
|
||||
/// </summary>
|
||||
public Func<bool>? DisplayTimestampsSource { get; set; }
|
||||
|
||||
/// <summary>Fires every time a new entry is appended.</summary>
|
||||
public event Action<ChatEntry>? EntryAppended;
|
||||
|
||||
|
|
@ -413,6 +435,14 @@ public sealed class ChatLog
|
|||
|
||||
private void Append(ChatEntry entry)
|
||||
{
|
||||
if (DisplayTimestampsSource?.Invoke() == true)
|
||||
{
|
||||
entry = entry with
|
||||
{
|
||||
Text = FormatTimestampPrefix() + entry.Text,
|
||||
};
|
||||
}
|
||||
|
||||
_buffer.Enqueue(entry);
|
||||
while (_buffer.Count > _maxEntries)
|
||||
_buffer.TryDequeue(out _);
|
||||
|
|
@ -420,6 +450,24 @@ public sealed class ChatLog
|
|||
EntryAppended?.Invoke(entry);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// SF-1/S4 (OP4 review-fix round, 2026-08-11): retail's constructor
|
||||
/// default <c>"%#H:%M:%S "</c> (<c>PlayerModule::PlayerModule
|
||||
/// @0x005D51F0</c>, BN-sourced string literal — wire research doc U6,
|
||||
/// NOT byte-verified) is non-zero-padded 24h hour, then zero-padded
|
||||
/// minute:second, trailing space. <c>H\:mm\:ss </c> with the colons
|
||||
/// ESCAPED (not the culture-dependent <c>DateTimeFormatInfo.
|
||||
/// TimeSeparator</c> placeholder) plus <see cref="CultureInfo.
|
||||
/// InvariantCulture"/> is the exact .NET equivalent — the CRT's
|
||||
/// <c>strftime</c> always emits a literal colon regardless of locale.
|
||||
/// acdream hardcodes this constructor default rather than reading the
|
||||
/// per-character override retail sources from
|
||||
/// <c>GenericQualitiesData::InqString(m_pPlayerOptionsData, 1, ...)</c>
|
||||
/// — see register row AP-197.
|
||||
/// </summary>
|
||||
private static string FormatTimestampPrefix() =>
|
||||
DateTime.Now.ToString(@"H\:mm\:ss ", CultureInfo.InvariantCulture);
|
||||
|
||||
public void Clear()
|
||||
{
|
||||
while (_buffer.TryDequeue(out _)) { /* drain */ }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue