Add majority lock and unlock voting for T5 and T6
This commit is contained in:
+27
-13
@@ -14,7 +14,7 @@ Platform quirks and deploy commands: [NOTES.md](NOTES.md).
|
||||
| [tws_t5_hud.gsc](tws_t5_hud.gsc) | Unboxed timers, branding, zombies/health and per-player `.hud` visibility toggle |
|
||||
| [tws_t5_afk.gsc](tws_t5_afk.gsc) | Persistent AFK reserve, contribution rewards, purchases and central countdown |
|
||||
| [tws_t5_join.gsc](tws_t5_join.gsc) | `.join` lets newcomers spawn before the current round ends |
|
||||
| [tws_t5_lock.gsc](tws_t5_lock.gsc) | Lobby `g_password` lock at a milestone round |
|
||||
| [tws_t5_lock.gsc](tws_t5_lock.gsc) | Automatic lobby lock plus majority `.lock` / `.unlock` votes |
|
||||
| [tws_t5_telemetry.gsc](tws_t5_telemetry.gsc) | Direct HTTP game start, round, heartbeat, and game end reports |
|
||||
| [tws_t5_leaderboard.gsc](tws_t5_leaderboard.gsc) | Private map record on connection, `.leaders` replay and adaptive round-start reminders |
|
||||
| [tws_t5_bank.gsc](tws_t5_bank.gsc) | Persistent shared GUID bank and private balance/deposit/withdraw commands |
|
||||
@@ -135,9 +135,9 @@ for cadence, interruption, cleanup and operation without the optional HUD.
|
||||
Type `.help` or `.commands` in chat to see available player commands and a short description.
|
||||
The response is visible only to the requesting player and works while spectating,
|
||||
before the first spawn. Commands are case-insensitive.
|
||||
Help uses the unboxed upper-right service area. All nine installed commands
|
||||
fit in one list with command and description columns. Additional registered
|
||||
commands use pages of nine rows, with a counter only for multi-page lists.
|
||||
Help uses the unboxed upper-right service area with command and description
|
||||
columns. Registered commands use pages of nine rows, with a counter only for
|
||||
multi-page lists.
|
||||
Pages advance every 12 seconds and close after the last page. Typing either
|
||||
command again returns to page one with a fresh timer. Both engines use
|
||||
explicit row positions so T5 does not concatenate newline-separated text.
|
||||
@@ -153,13 +153,14 @@ explicit row positions so T5 does not concatenate newline-separated text.
|
||||
| `.b` | Check bank balance (bank module required) |
|
||||
| `.d <amount\|all>` | Deposit points (bank module required) |
|
||||
| `.w <amount\|all>` | Withdraw points (bank module required) |
|
||||
| `.lock` | Vote to lock the lobby from round 6 (lock module required) |
|
||||
| `.unlock` | Vote to unlock the lobby (lock module required) |
|
||||
|
||||
Each module registers its own help entries. Commands follow the order above,
|
||||
independent of initialization order; removing a module also removes its entries
|
||||
from `.help` after a map restart.
|
||||
With all command modules installed, help shows one page of nine commands,
|
||||
including the full `.d <amount|all>` / `.w <amount|all>` syntax. Removing HUD
|
||||
removes `.hud` from the list.
|
||||
Each module registers its own help entries. The first nine commands follow
|
||||
the order above; additional entries follow registration order. Removing a module
|
||||
also removes its entries from `.help` after a map restart. 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.
|
||||
The enabled leaderboard module registers `.leaders`, which replays the latest
|
||||
cached map record privately. Repeating it restarts the record from the first page;
|
||||
help pauses the record's remaining page time and resumes it after the final
|
||||
@@ -393,9 +394,16 @@ and [spawn entry point](https://github.com/plutoniummod/t5-scripts/blob/main/ZM/
|
||||
|
||||
**Features**
|
||||
- Sets `g_password` to a random per-lobby value when the round crosses a
|
||||
milestone (default: round 20)
|
||||
milestone (default: round 20), once per match
|
||||
- Adds `.lock` from round 6 and `.unlock` whenever locked, using strict-majority
|
||||
votes (1/1, 2/2, 2/3, 3/4) of all connected players
|
||||
- Votes expire after 60 seconds; duplicates do not count, and roster changes
|
||||
update the tally without retaining disconnected votes
|
||||
- A successful unlock disables automatic locking for the rest of that match;
|
||||
players can vote to relock at any time from round 6
|
||||
- No automatic round-6 prompt; progress/results use ordinary message text
|
||||
- Existing players are unaffected; `g_password` is only checked at connect
|
||||
- Clears `g_password` on `hud_game_over` so the next lobby opens unlocked
|
||||
- Clears `g_password` and pending votes at startup and on HUD/stock game-over events
|
||||
- Trigger round is dvar-driven — retune without redeploying
|
||||
|
||||
**Provides**
|
||||
@@ -403,13 +411,19 @@ and [spawn entry point](https://github.com/plutoniummod/t5-scripts/blob/main/ZM/
|
||||
|---|---|
|
||||
| `level.lock_round` | Round at which the lobby locks (read at init) |
|
||||
| `level.lock_active` | `true` after the password has been set |
|
||||
| `level.lock_auto_done` | Automatic locking consumed or overridden by a successful unlock |
|
||||
| `level.lock_vote` | Current ballot, or undefined when idle |
|
||||
|
||||
**Depends on**
|
||||
- `scripts\sp\tws_t5_common::` — `ensure_config`, `int_dvar_or`
|
||||
- `scripts\sp\tws_t5_common::` — `ensure_config`, `int_dvar_or`, `register_help_command`
|
||||
- `tws_t5_hud` — waits on `hud_round_changed` and `hud_game_over`
|
||||
- Stock BO1: `level.round_number`
|
||||
- Dvar: `tws_lock_round` (int, default `20`)
|
||||
|
||||
Lock `1.1.0` has no new dependency requirement. Copy the updated script and
|
||||
restart the map; no full server-process restart is required. See the shared
|
||||
[voting behavior and validation](../../README.md#lobby-lock-voting-t5-and-t6).
|
||||
|
||||
---
|
||||
|
||||
## Dvars
|
||||
|
||||
Reference in New Issue
Block a user