R3: Player, server and contributor documentation
- docs/PLAY.md is now the player guide: install from the tarball or .deb, starting a match, controls, how a match goes, settings files and troubleshooting, ahead of the graphics and tested-configuration sections. - docs/SERVER.md: quick start, every option, ports, being found, logs, Docker and systemd, memory, and what was checked. - CONTRIBUTING.md (engine setup, rules, commits, licence of contributions) and CREDITS.md. - README: status and known limitations as they are. - GDD controls table matched to the real defaults (B, Tab, G, 1 to 6). Running the documented commands from an unpacked release found two bugs, fixed here: - `tidewall --connect=HOST` ignored the option unless it came after `--`. ClientConfig.game_args() now takes the game's own options from the engine's arguments when there is no `--`; tested. - A headless run with no mode printed a line and never exited; it quits now. The renderer option is given as the pair the capture tests use (`--rendering-method gl_compatibility --rendering-driver opengl3`) in the docs, the tarball README and the man page. The Join menu only searching the LAN is documented and filed as #82. Closes #62 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -41,6 +41,28 @@ var asked: bool = false
|
||||
var errors: Array[String] = []
|
||||
|
||||
|
||||
## Every option parse() knows, by name.
|
||||
const OPTIONS: Array[String] = [
|
||||
"--offline", "--autoplay", "--browse", "--list", "--lan-port", "--lan-target",
|
||||
"--connect", "--name", "--seed", "--bots", "--client-seconds",
|
||||
]
|
||||
|
||||
|
||||
## The game's own options from the command line. Godot hands the options after "--" to
|
||||
## the game (`user`); a player who leaves the "--" out, as in `tidewall --connect=HOST`,
|
||||
## has them among the engine's options (`all`) instead, so then the ones this class
|
||||
## knows are taken from there. The engine's own options, such as --headless, are left
|
||||
## alone. With options after "--", those alone count.
|
||||
static func game_args(user: PackedStringArray, all: PackedStringArray) -> PackedStringArray:
|
||||
if not user.is_empty():
|
||||
return user
|
||||
var found: PackedStringArray = PackedStringArray()
|
||||
for arg: String in all:
|
||||
if OPTIONS.has(arg.split("=", true, 1)[0]):
|
||||
found.append(arg)
|
||||
return found
|
||||
|
||||
|
||||
static func parse(args: PackedStringArray) -> ClientConfig:
|
||||
var config: ClientConfig = ClientConfig.new()
|
||||
for arg: String in args:
|
||||
|
||||
Reference in New Issue
Block a user