Snapshot unreviewed LocalMP battle work as rework baseline

Records the uncommitted battle-session work exactly as it was left
(local service matchmaking, settlement, chat, native LocalMP hooks,
battle gui/exe patches) so the following review and rework commits
show every correction as a diff against this state.

This commit is not reviewed and is known to be incomplete: in-game
testing reported wrong settlement rewards, single-country teams,
missing random/fixed supplement slots, misattributed hit messages and
other regressions. Do not merge this branch before the rework lands.
This commit is contained in:
N0VAN0M4LY committed 2026-11-28 03:15:47 +08:00
1 parent aa272fc82b
commit 6a189513b0
97 files changed
+7676 -396

No files matched your search

+39
View File
@@ -0,0 +1,39 @@
"""Command to verify `gui-patches/` against `gui.vromfs.bin` with Quirrel bytecode compilation.
wtotools check-gui --gui <gui.vromfs.bin> [--patches gui-patches] [--sq build/quirrel-check/sq.exe]
"""
from __future__ import annotations
import argparse
import sys
from pathlib import Path
from ..gui_check import verify_gui_patches
DEFAULT_GUI_PATCHES = Path("gui-patches")
DEFAULT_SQ_EXE = Path("build/quirrel-check/sq.exe")
def register(commands: argparse._SubParsersAction) -> None:
check = commands.add_parser(
"check-gui",
help="apply gui-patches in memory and bytecode-compile every modified .nut script",
)
check.add_argument("--gui", type=Path, required=True, help="stock gui.vromfs.bin to read")
check.add_argument("--patches", type=Path, default=DEFAULT_GUI_PATCHES, help="gui-patches directory")
check.add_argument("--sq", type=Path, default=DEFAULT_SQ_EXE, help="Quirrel compiler sq.exe path")
check.set_defaults(handler=_check_gui)
def _check_gui(args: argparse.Namespace) -> int:
if not args.sq.exists():
print(f"Quirrel compiler not found: {args.sq}", file=sys.stderr)
return 2
report = verify_gui_patches(args.gui, args.patches, args.sq)
print(f"{report.patches_applied} GUI patch(es) applied across {report.files_checked} .nut file(s)")
if report.errors:
for error in report.errors:
print(f" {error}", file=sys.stderr)
return 1
print(" every patched .nut file compiled to Quirrel bytecode with zero lexical/constant errors")
return 0