chore: client/tools standards nits — dedup, splits, idioms (#51) #125
No reviewers
Labels
No labels
alpha:wave-0
alpha:wave-1
alpha:wave-2
alpha:wave-3
area:assets
area:combat
area:ecology
area:infra
area:render
area:scripting
area:ui
area:world
enhancement
epic
migration
post-alpha
roadmap
tech-debt
type:bug
type:chore
type:design
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
marco/IsoMmo!125
Loading…
Reference in a new issue
No description provided.
Delete branch "chore/client-standards-nits"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Client/tools standards micro-nits from #51 — the mechanical, low-risk subset:
ToRgba(copied verbatim inAnimMulReader/ArtMulReader/GumpMulReader) → oneUoColor.ToRgba; theSystem.Numerics→XNAVector2bridge (hand-written ~6× acrossPlayer/Mobile/Corpse/GridRenderer/WorldRenderer/ScreenProjection) → oneNumericsExtensions.ToXna.AssetPack.cs's public records intoFrameData.cs/AnimationData.cs; movedHumanArtSetto its own file and renamed itAnimationSet(it's reused for creatures/corpses/effects, not just the human).AssetPack,WebSocketConnection,JwtTokenService; aStartsWith("--")gainsStringComparison.Ordinal.Deferred (kept on a re-scoped #51): the
ClientConfig/Sessionsingle-source item — it touches session wiring (AccessToken/URLs) across login/game/connection and deserves its own careful pass, not a drive-by. The "redundant usings in AssetEditor" item was already clean (unused usings are build errors here, and the build is green).Screenshots / recording
No visible change (refactor only).
How it was tested
dotnet testgreen (331); whole solution builds 0 warnings;just lintclean. No behavioural change — pure dedup / file-split / idiom.Checklist
just lintpasses (CSharpier + analyzers, zero warnings)just testis green- Dedup: ARGB1555->RGBA `ToRgba` (was copied in Anim/Art/Gump mul readers) -> one `UoColor.ToRgba`; the System.Numerics->XNA Vector2 bridge (copied ~6x across Player/Mobile/Corpse/GridRenderer/WorldRenderer/ScreenProjection) -> one `NumericsExtensions.ToXna`. - One-type-per-file: split `AssetPack.cs` public records into `FrameData.cs` / `AnimationData.cs`; moved `HumanArtSet` to its own file and renamed it `AnimationSet` (it's reused for creatures/corpses/effects, not just the human). - Idioms: primary ctors for `AssetPack`, `WebSocketConnection`, `JwtTokenService`; `StartsWith("--")` -> `StartsWith("--", StringComparison.Ordinal)`. Deferred: the ClientConfig/Session single-source item (touches session wiring across the client) — left on a re-scoped #51. (AssetEditor 'redundant usings' item was already clean — the analyzer would fail the build otherwise.)