feat(ui): port retail gameplay indicator bar
Promote all seven LayoutDesc 0x21000071 controls to retained buttons, drive link quality, effects, Vitae, and burden from live state, and route Character Information plus end-session confirmation through the shared UI owners. Keep network timing in WorldSession and pin retail thresholds, flash cadence, authored states, and action routing with focused conformance tests. Release build and all 5,807 tests pass with five intentional skips. Connected visual gate pending. Co-authored-by: OpenAI Codex <codex@openai.com>
This commit is contained in:
parent
06016014bc
commit
52c529be86
15 changed files with 857 additions and 204 deletions
46
tests/AcDream.Core.Net.Tests/WorldSessionLinkStatusTests.cs
Normal file
46
tests/AcDream.Core.Net.Tests/WorldSessionLinkStatusTests.cs
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
using AcDream.Core.Net;
|
||||
using Xunit;
|
||||
|
||||
namespace AcDream.Core.Net.Tests;
|
||||
|
||||
public sealed class WorldSessionLinkStatusTests
|
||||
{
|
||||
[Theory]
|
||||
[InlineData(WorldSession.State.Disconnected)]
|
||||
[InlineData(WorldSession.State.Failed)]
|
||||
public void DisconnectedStates_DoNotPublishPacketAge(WorldSession.State state)
|
||||
{
|
||||
LinkStatusSnapshot snapshot = WorldSession.BuildLinkStatus(
|
||||
state, lastInboundPacketTicks: 100, nowTicks: 900, frequency: 100);
|
||||
|
||||
Assert.False(snapshot.Connected);
|
||||
Assert.Equal(0d, snapshot.SecondsSinceLastPacket);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(WorldSession.State.Handshaking)]
|
||||
[InlineData(WorldSession.State.InCharacterSelect)]
|
||||
[InlineData(WorldSession.State.EnteringWorld)]
|
||||
[InlineData(WorldSession.State.InWorld)]
|
||||
public void ConnectedStates_PublishMonotonicPacketAge(WorldSession.State state)
|
||||
{
|
||||
LinkStatusSnapshot snapshot = WorldSession.BuildLinkStatus(
|
||||
state, lastInboundPacketTicks: 100, nowTicks: 850, frequency: 100);
|
||||
|
||||
Assert.True(snapshot.Connected);
|
||||
Assert.Equal(7.5d, snapshot.SecondsSinceLastPacket);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ClockRegression_ClampsPacketAgeToZero()
|
||||
{
|
||||
LinkStatusSnapshot snapshot = WorldSession.BuildLinkStatus(
|
||||
WorldSession.State.InWorld,
|
||||
lastInboundPacketTicks: 200,
|
||||
nowTicks: 100,
|
||||
frequency: 100);
|
||||
|
||||
Assert.True(snapshot.Connected);
|
||||
Assert.Equal(0d, snapshot.SecondsSinceLastPacket);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue