feat(chat): port retail client command families
Expand the typed client-command boundary across travel, character queries, local UI and layout controls, AFK and consent, emotes, friends, squelch and filters, and fill-components. Preserve retail packet layouts and queue ownership, import the confirmation dialog, and keep authoritative social state in Core. Co-Authored-By: Codex <codex@openai.com>
This commit is contained in:
parent
5a45a7ac7f
commit
9ea579bdd0
47 changed files with 6659 additions and 99 deletions
31
src/AcDream.Core/Ui/RetailPositionFormatter.cs
Normal file
31
src/AcDream.Core/Ui/RetailPositionFormatter.cs
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
using System.Globalization;
|
||||
using AcDream.Core.Physics;
|
||||
|
||||
namespace AcDream.Core.Ui;
|
||||
|
||||
/// <summary>Retail text formatting for world positions and outdoor cells.</summary>
|
||||
public static class RetailPositionFormatter
|
||||
{
|
||||
/// <summary>
|
||||
/// Verbatim field order and precision from
|
||||
/// <c>Position::ToString @ 0x005A9330</c>.
|
||||
/// </summary>
|
||||
public static string Format(Position position)
|
||||
{
|
||||
var p = position.Frame.Origin;
|
||||
var q = position.Frame.Orientation;
|
||||
return string.Create(CultureInfo.InvariantCulture,
|
||||
$"0x{position.ObjCellId:X8} [{p.X:F6} {p.Y:F6} {p.Z:F6}] " +
|
||||
$"{q.W:F6} {q.X:F6} {q.Y:F6} {q.Z:F6}");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Port of <c>LandDefs::CellidToCoordinateString @ 0x005A9CB0</c>.
|
||||
/// Returns null for indoor/invalid cells, matching the underlying
|
||||
/// <c>gid_to_lcoord</c> failure.
|
||||
/// </summary>
|
||||
public static string? FormatOutdoorCell(uint cellId) =>
|
||||
RadarCoordinates.TryFromCell(cellId, out var coordinates)
|
||||
? coordinates.CombinedText
|
||||
: null;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue