Improve command discovery and welcome messages
This commit is contained in:
@@ -217,6 +217,17 @@ Live checks after deploying:
|
||||
registered commands to exercise the nine-row page limit and page counter.
|
||||
Remove optional modules and restart the map to confirm their commands are
|
||||
absent. Restore them and confirm command behavior is unchanged.
|
||||
Try `.info`, `.INFO` and `.command`: each opens the same private help.
|
||||
Send `.unknown` and `!unknown`: only the sender sees
|
||||
`Unknown command. Type .help for the list`; ordinary chat gets no reply.
|
||||
With bank enabled, `.w 2000` reaches its handler without an unknown reply.
|
||||
`.record` and `.RECORD` replay records like `.leaders`, including during help.
|
||||
Disable leaderboard and restart: both `.record` and `.leaders` get the private
|
||||
unknown reply. Restore the module afterward.
|
||||
Check `Type .help for commands` appears once after the welcome delay in the
|
||||
same private message area and style as the unknown-command reply, including
|
||||
empty history or record data still loading. There must be no hint in the record
|
||||
HUD and no repeated hint on manual replay or compact round reminders.
|
||||
7. Interrupt a record with help and check that its remaining page time resumes.
|
||||
Repeat `.leaders` during help; only the latest replay should start from page
|
||||
one after help closes. Check long names across pages, no records and
|
||||
|
||||
+17
-6
@@ -13,7 +13,7 @@ private server token.
|
||||
| `tws_t6_lock.gsc` | Auto-lock at round 20 plus majority `.lock` / `.unlock` votes; clear on game over | Common, HUD |
|
||||
| `tws_t6_telemetry.gsc` | Async queued game reports (game_start/heartbeat/round_change/game_end) | tws-t6-gsc-utils |
|
||||
| `tws_t6_join.gsc` | `.join` chat command lets a spectator newcomer enter mid-match once | Common |
|
||||
| `tws_t6_leaderboard.gsc` | Private map and personal records on connection, `.leaders` replay and adaptive round-start reminders | Common 1.6.1+, tws-t6-gsc-utils |
|
||||
| `tws_t6_leaderboard.gsc` | Private map and personal records on connection, `.leaders` replay and adaptive round-start reminders | Common 1.7.0+, tws-t6-gsc-utils |
|
||||
| `tws_t6_bank.gsc` | Persistent shared GUID bank | Common, telemetry, TWS plugin 1.2.0 |
|
||||
| `tws_t6_moderation.gsc` | Optional controller-managed bans, mutes and live moderation | Common 1.2.0+, TWS plugin 1.3.0+ |
|
||||
|
||||
@@ -98,7 +98,9 @@ and the stock HUD are unaffected. `.hud` requires the HUD module.
|
||||
Common provides one unboxed upper-right service area below the Plutonium tag.
|
||||
Records are right aligned: `Map Record | Round N`, every tied holder on its own
|
||||
line, then a blank row and a separate `Your Best | Round N` heading. The whole
|
||||
record is shown at once for 12 seconds, with no pages, counter or footer. Help displays
|
||||
record is shown at once for 12 seconds, with no pages, counter or footer. The
|
||||
initial `Type .help for commands` hint uses the same private native message
|
||||
area and style as unknown-command replies. Help displays
|
||||
the installed command list in pages of nine rows in aligned rows. Services remain private, leave the
|
||||
core in place and work without the HUD module installed. See the
|
||||
[shared layout and validation guide](../../README.md#core-hud-and-service-window-t5-and-t6).
|
||||
@@ -114,7 +116,7 @@ HUD `1.4.2` requires common `1.4.0+` and
|
||||
`SetTextUnlimited` counter, updated only when the count changes. Deploy the
|
||||
updated HUD script and restart the map on r5334+; no full server-process
|
||||
restart is required. Older Plutonium revisions need client/server updates and
|
||||
full restarts first. Leaderboard `1.3.1` requires common `1.6.1+` for its
|
||||
full restarts first. Leaderboard `1.4.1` requires common `1.7.0+` for its
|
||||
personal records and round-start reminders. AFK `2.0.0` requires the matching
|
||||
plugin `1.4.0+` and EC reserve service; see the [AFK guide](../../docs/afk.md).
|
||||
|
||||
@@ -124,7 +126,7 @@ plugin `1.4.0+` and EC reserve service; see the [AFK guide](../../docs/afk.md).
|
||||
It works independently of telemetry and HUD, and privately announces records
|
||||
once per connection, including newcomers waiting in spectator mode.
|
||||
|
||||
Leaderboard `1.3.1` requires common `1.6.1+`. Copy both scripts to
|
||||
Leaderboard `1.4.1` requires common `1.7.0+`. Copy both scripts to
|
||||
`Plutonium/storage/t6/scripts/zm/` and restart the map. This script update adds
|
||||
no native-plugin or backend dependency and requires no full server-process
|
||||
restart when the existing plugin is installed.
|
||||
@@ -169,12 +171,12 @@ explicit row positions so T5 does not concatenate newline-separated text.
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `.help`, `.commands` | List available commands |
|
||||
| `.help`, `.commands`, `.info`, `.command` | List available commands |
|
||||
| `.hud` | Hide or show your core HUD (AFK countdown stays visible) |
|
||||
| `.afk` | Enter protected AFK using your time reserve |
|
||||
| `.back` | Return from AFK |
|
||||
| `.join` | Join mid-round (newcomers only) |
|
||||
| `.leaders` | Show map and personal records (leaderboard module required) |
|
||||
| `.leaders`, `.record` | Show map and personal records (leaderboard module required) |
|
||||
| `.b` | Check bank balance (bank module required) |
|
||||
| `.d <amount\|all>` | Deposit points (bank module required) |
|
||||
| `.w <amount\|all>` | Withdraw points (bank module required) |
|
||||
@@ -189,6 +191,15 @@ commands alongside their module's initialization so the list stays current.
|
||||
Lock and extended AFK commands appear on additional pages. Bank entries retain
|
||||
the full `.d <amount|all>` / `.w <amount|all>` syntax. Removing HUD removes `.hud`
|
||||
from the list.
|
||||
|
||||
Unknown messages starting with `.` or `!` receive a private
|
||||
`Unknown command. Type .help for the list` reply. Recognition compares the first
|
||||
word with installed help registrations, including argument labels, so `.w 2000`
|
||||
gets no false unknown-command reply. Ordinary chat is unaffected. `.info` and
|
||||
`.command` alias `.help`; `.record` aliases `.leaders` only with the enabled
|
||||
leaderboard module. Aliases are case-insensitive exact messages and add no help
|
||||
rows. Run `node tools/check_commands.mjs` from the repository root.
|
||||
|
||||
The enabled leaderboard module registers `.leaders`, which replays the latest
|
||||
map and personal records privately. Repeating it restarts the full 12-second
|
||||
announcement; help pauses the record's remaining time and resumes it after the
|
||||
|
||||
@@ -153,11 +153,46 @@ help_chat_listener()
|
||||
continue;
|
||||
|
||||
command = toLower(message);
|
||||
if (command == ".help" || command == ".commands")
|
||||
if (command == ".help" || command == ".commands" || command == ".info" || command == ".command")
|
||||
player show_help();
|
||||
else if (help_unknown_command(command))
|
||||
player iPrintLn("Unknown command. Type .help for the list");
|
||||
}
|
||||
}
|
||||
|
||||
// Compare command tokens, not help labels containing argument syntax.
|
||||
help_first_word(message)
|
||||
{
|
||||
words = strTok(toLower(message), " \t\r\n");
|
||||
if (words.size == 0)
|
||||
return "";
|
||||
return words[0];
|
||||
}
|
||||
|
||||
help_unknown_command(message)
|
||||
{
|
||||
if (message.size == 0)
|
||||
return false;
|
||||
prefix = getSubStr(message, 0, 1);
|
||||
if (prefix != "." && prefix != "!")
|
||||
return false;
|
||||
|
||||
command = help_first_word(message);
|
||||
if (command == ".help" || command == ".commands" || command == ".info" || command == ".command")
|
||||
return false;
|
||||
if (isDefined(level.tws_help_commands))
|
||||
{
|
||||
for (i = 0; i < level.tws_help_commands.size; i++)
|
||||
{
|
||||
registered = help_first_word(level.tws_help_commands[i].command);
|
||||
// The record alias is available when the leaderboard registers itself.
|
||||
if (command == registered || (command == ".record" && registered == ".leaders"))
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// A single per-player controller owns service priority, pages and expiry.
|
||||
show_help()
|
||||
{
|
||||
|
||||
@@ -171,6 +171,8 @@ lb_welcome()
|
||||
wait 0.25;
|
||||
wait 5;
|
||||
|
||||
self iPrintLn("Type .help for commands");
|
||||
|
||||
while (!isDefined(level.tws_lb_cache) && level.tws_lb_attempt == 0)
|
||||
wait 0.25;
|
||||
|
||||
@@ -188,7 +190,7 @@ lb_chat_listener()
|
||||
level waittill("say", message, player);
|
||||
if (!isDefined(player) || !isDefined(message))
|
||||
continue;
|
||||
if (toLower(message) == ".leaders")
|
||||
if (toLower(message) == ".leaders" || toLower(message) == ".record")
|
||||
player thread lb_request(true);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user