Add map record HUD announcements for T5 and T6
This commit is contained in:
+24
-4
@@ -1,7 +1,7 @@
|
||||
# tws-t5-aio
|
||||
|
||||
Custom HUD + persistent bank + AFK toggle + immediate join + lobby lock + game telemetry for Plutonium T5
|
||||
(Black Ops 1) zombies dedicated servers. Split across eight `.gsc` files,
|
||||
Custom HUD + persistent bank + AFK toggle + immediate join + lobby lock + game telemetry + map records for Plutonium T5
|
||||
(Black Ops 1) zombies dedicated servers. Split across nine `.gsc` files,
|
||||
each installable / removable in isolation (with `tws_common` as the shared
|
||||
hub).
|
||||
|
||||
@@ -11,7 +11,7 @@ Platform quirks and deploy commands: [NOTES.md](NOTES.md).
|
||||
|
||||
| File | Role |
|
||||
|---|---|
|
||||
| [tws_common.gsc](tws_common.gsc) | Shared config, HUD helpers, `.help`, spawn-handler registry, single `connected` listener + dispatcher |
|
||||
| [tws_common.gsc](tws_common.gsc) | Shared config, HUD helpers, `.help`, connect/spawn registries, single `connected` listener + dispatcher |
|
||||
| [tws_db.gsc](tws_db.gsc) | MariaDB pool config + reachability probe |
|
||||
| [tws_hud.gsc](tws_hud.gsc) | Bottom-left HUD stack: timers, zombie count, health bar |
|
||||
| [tws_bank.gsc](tws_bank.gsc) | Persistent per-player bank + console commands |
|
||||
@@ -19,6 +19,22 @@ Platform quirks and deploy commands: [NOTES.md](NOTES.md).
|
||||
| [tws_join.gsc](tws_join.gsc) | `.join` lets newcomers spawn before the current round ends |
|
||||
| [tws_lock.gsc](tws_lock.gsc) | Lobby `g_password` lock at a milestone round |
|
||||
| [tws_telemetry.gsc](tws_telemetry.gsc) | Direct HTTP game start, round, heartbeat, and game end reports |
|
||||
| [tws_leaderboard.gsc](tws_leaderboard.gsc) | Private map high-round record and all tied holders on connection |
|
||||
|
||||
## Map record announcements
|
||||
|
||||
Copy `tws_leaderboard.gsc` and the updated `tws_common.gsc` to
|
||||
`storage/t5/scripts/sp/`, then restart the map. Leaderboard requires a
|
||||
[t5-gsc-utils](https://github.com/alicealys/t5-gsc-utils) build exposing
|
||||
`http::request`, `jsonParse`, `typeof` and `formatString`. A plugin upgrade
|
||||
requires a full server-process restart. To omit leaderboard, remove its script;
|
||||
the enable dvar does not bypass native linking dependencies.
|
||||
|
||||
Records are read from the public Electric Cherry API with no credentials and
|
||||
work independently of telemetry, HUD and the bank. Spectator newcomers receive
|
||||
the same private announcement as playable joins. T5 matches its engine map to
|
||||
the API's map list. [Shared configuration, caching and validation](../README.md#map-record-announcements)
|
||||
apply to both games.
|
||||
|
||||
## Player commands
|
||||
|
||||
@@ -58,12 +74,14 @@ graph BT
|
||||
bank[tws_bank]
|
||||
lock[tws_lock]
|
||||
telemetry[tws_telemetry]
|
||||
leaderboard[tws_leaderboard]
|
||||
|
||||
db --> common
|
||||
hud --> common
|
||||
afk --> common
|
||||
join --> common
|
||||
telemetry --> common
|
||||
leaderboard --> common
|
||||
|
||||
bank -. db_probe_done .-> db
|
||||
lock -. hud_round_changed<br/>hud_game_over .-> hud
|
||||
@@ -73,7 +91,7 @@ graph BT
|
||||
- All other cross-module coupling flows through level notifies
|
||||
(`db_probe_done`, `hud_round_changed`, `hud_match_started`,
|
||||
`hud_game_over`) or through spawn handlers registered with
|
||||
`tws_common::register_spawn_handler`.
|
||||
`tws_common::register_spawn_handler` / `register_connect_handler`.
|
||||
- Any file except `tws_common` can be removed; the rest still load.
|
||||
`tws_afk` has no downstream consumers — pull it independently.
|
||||
`tws_bank` needs `tws_db`; `tws_lock` needs `tws_hud`.
|
||||
@@ -99,6 +117,7 @@ connect listener anywhere else crashes the T5 SP handshake.
|
||||
- Shared HUD constants: `level.hud_x`, `hud_y`, `hud_row_*`, `hud_col_*`,
|
||||
`hud_font_*`, `hud_bar_*`, `hud_c_*`, `hud_rate`, `hud_health_threshold`
|
||||
- Spawn-handler registry
|
||||
- Connection-handler registry for optional modules that serve spectator newcomers
|
||||
- `.help` listener and help registry populated by installed command modules
|
||||
- Connect listener + per-player dispatch: iterates
|
||||
`level.tws_spawn_handlers` after `spawned_player` and threads each on
|
||||
@@ -110,6 +129,7 @@ connect listener anywhere else crashes the T5 SP handshake.
|
||||
| `common_config()` | Populate every `level.hud_*` (idempotent) |
|
||||
| `ensure_config()` | No-op if config already set; called by every module's `init` |
|
||||
| `register_spawn_handler(fn)` | Appends `::fn` to `level.tws_spawn_handlers` |
|
||||
| `register_connect_handler(fn)` | Threads `::fn` after connection dispatch yields, without waiting for playable spawn |
|
||||
| `register_help_command(command, description)` | Adds a player command to `.help`; call from the owning module's `init()` |
|
||||
| `make_text_elem(p, x, y, ax, s, c)`| `NewClientHudElem` text element with black-glow outline |
|
||||
| `make_shader_elem(p, x, y)` | `NewClientHudElem` shader element |
|
||||
|
||||
Reference in New Issue
Block a user