Add persistent Discord URL to T5 and T6 HUDs
This commit is contained in:
+10
-1
@@ -7,7 +7,7 @@ separate token config or database setup is required.
|
||||
| File | Role | Dependencies |
|
||||
| --- | --- | --- |
|
||||
| `tws_t6_common.gsc` | Shared HUD values, helpers, `.help`, connection and first-spawn dispatchers | Stock T6 |
|
||||
| `tws_t6_hud.gsc` | Match/round timers, name, zombie count and health bar | Common |
|
||||
| `tws_t6_hud.gsc` | Top-left Discord URL, match/round timers, name, zombie count and health bar | Common |
|
||||
| `tws_t6_afk.gsc` | `.afk` / `.back`, protection, movement and weapon blocking | Common |
|
||||
| `tws_t6_lock.gsc` | Lock at round 20; clear password on game over | Common, HUD |
|
||||
| `tws_t6_telemetry.gsc` | Async queued game reports (game_start/heartbeat/round_change/game_end) | tws-t6-gsc-utils |
|
||||
@@ -40,6 +40,15 @@ Keep the filenames and `scripts/zm` location so shared references resolve.
|
||||
To omit telemetry, remove its script; disabling it at runtime does not remove
|
||||
its plugin dependency during linking. The same rule applies to leaderboard.
|
||||
|
||||
## Persistent Discord text
|
||||
|
||||
The HUD shows `https://discord.thewrightserver.net` in small light-gray text
|
||||
at the top-left, including for newcomers waiting in spectator mode. The label
|
||||
is created once per connection and persists across death and respawn. The
|
||||
gameplay HUD starts one line lower, keeping timers, help and records clear.
|
||||
Install HUD and common `1.1.0` together, then restart the map; no plugin update
|
||||
or full server-process restart is required.
|
||||
|
||||
## Map record announcements
|
||||
|
||||
`tws_t6_leaderboard.gsc` reads the public Electric Cherry API without credentials.
|
||||
|
||||
@@ -22,9 +22,9 @@ common_config()
|
||||
if (isDefined(level.hud_x))
|
||||
return;
|
||||
|
||||
// Small inset from the physical screen corner (fullscreen HUD coordinates).
|
||||
// Fullscreen coordinates; reserve the top line for the Discord URL.
|
||||
level.hud_x = 10;
|
||||
level.hud_y = 10;
|
||||
level.hud_y = 30;
|
||||
|
||||
level.hud_row_match = level.hud_y;
|
||||
level.hud_row_round = level.hud_y + 15;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* tws_t6_hud.gsc - configurable HUD stack: timers, zombie count, health bar. */
|
||||
/* tws_t6_hud.gsc - top-left Discord URL, timers, zombie count and health bar. */
|
||||
|
||||
#include maps\mp\_utility;
|
||||
#include common_scripts\utility;
|
||||
@@ -16,6 +16,21 @@ init()
|
||||
level thread game_over_watcher();
|
||||
|
||||
scripts\zm\tws_t6_common::register_spawn_handler(::hud_start);
|
||||
scripts\zm\tws_t6_common::register_connect_handler(::hud_discord);
|
||||
}
|
||||
|
||||
// One static label per connection, including newcomers waiting to spawn.
|
||||
hud_discord()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
label = scripts\zm\tws_t6_common::make_text_elem(
|
||||
self, 10, 10, "left", level.hud_font_small, level.hud_c_label);
|
||||
label SetText("https://discord.thewrightserver.net");
|
||||
|
||||
elems = [];
|
||||
elems[elems.size] = label;
|
||||
self thread scripts\zm\tws_t6_common::destroy_on_disconnect(elems);
|
||||
}
|
||||
|
||||
hud_start()
|
||||
|
||||
Reference in New Issue
Block a user