Repository navigation
Time limits for every point-scored mode, configurable, and match-time on the wire - #32
Merged
Merged
Conversation
…odeState for every timed mode CTF and ngCTF ended only at the capture limit and could go on for ever. They (and Babel) now end by the score when 1200 s run out, a tie is a draw, and /extend works on them. Every timed mode (CTF, ngCTF, Babel, TC, TDM, Koth) says its seconds left in GameModeState's match-time, so a client can count down. SP_MATCH_SECONDS shortens the limit for tests.
One key per mode (ctf_seconds, ngctf_seconds, babel_seconds, tc_seconds, tdm_seconds, koth_seconds), 30..86400, defaults as before (20 min, 15 for TDM and Koth). config.toml's check refuses a value out of range and a mistyped key. SP_MATCH_SECONDS still overrides every mode for tests. A match never runs for ever: there is no 0 or off.
…[ngctf], [babel], [tc], [tdm], [koth] Replaces the [match] table of the previous commit. Same range (30..86400), same defaults, same check.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
match_secondsruns out (tie = draw);/extendworks on them.match_seconds(30..86400) lives in each mode's own section:[ctf],[ngctf],[babel],[tc],[tdm],[koth]. Defaults unchanged (1200 s; 900 s for TDM and KotH).--check-configrejects values out of range. No "off": arena, ptb and zombie keep theirround_seconds, creative has no end.match-time(seconds left) for every timed mode, documented indocs/protocol-1.0.md, so a client can count down or play closing music.SP_MATCH_SECONDSoverrides every mode for tests.Tested by running the server in ctf, ngctf, babel, tc, tdm and koth with a short limit: each ended by time, and
match-timecounted down.