Files
2026-10-28 18:54:43 +07:00

1.9 KiB

Ping colors

Maintained script: scripts/ping_rainbow.lua; included in the self-contained Game/SDK builds through assets_ship.go. Root servers read the external script on heartbeat, so a live fix does not require restarting the server or game.

Current behavior and confirmation

The user confirmed on 2026-10-26 that signal/text colors now match and changing ping digits no longer flicker. The initial three-slice version was confirmed to show all signal bars, but its original tinted texture darkened the colors and writing rich text caused a flash whenever native latency changed.

The maintained version uses a tiny white-RGB mask with the signal sprite's original alpha. It crops only the named NetStatusPanel signal icon from its atlas once on creation, not the whole UI. Three UV slices color each bar independently. The background and native connectivity state remain unchanged.

Text keeps the real Client latency string. The canvas callback colors the native TextGenerator glyph vertices instead of replacing the string with color tags. This removes the native-setter/rich-text race. Current Client capture proves 10ms has sixteen populated vertices; no presumed trailing quad is discarded. CanvasRenderer.GetMesh is unavailable in this engine, so the current path uses the retained native generator and SetMesh.

Only the named walking/Battle latency widgets are targeted. No global Canvas, world camera, server-name watermark or unrelated UI is modified. Lifecycle cleanup restores owned components and disposes generated textures/meshes. Research capture scripts stay in tools/, not scripts/.

Runtime evidence is retained under battle_diagnostics/ping-colors-20261026/. The walking widget is Client-confirmed; Battle has the existing exact path but was not separately exercised during this confirmation. Lua syntax checking and shipping compilation are separate from that visual confirmation.