Add the AirDef tablet web panel and battle archive (#153)

This commit is contained in:
2026-12-02 00:46:18 +03:00
parent dfb306edd7
commit 906159b17f
22 changed files with 2770 additions and 1 deletions
+14
View File
@@ -6,6 +6,7 @@
python3 tools/airdef.py mod # собрать мод airdef.hmod — нужен Rust с wasm32
python3 tools/airdef.py install # положить мод в папку игры и включить
python3 tools/airdef.py play [аргументы игры] # запустить форк на папке игры
python3 tools/airdef.py web [параметры] # запустить AirDef с веб-пультом
python3 tools/airdef.py all # всё по порядку: fork, game, mod, install
python3 tools/airdef.py check # совпадают ли форк, упаковщик, уровень API мода и ресурсы
python3 tools/airdef.py test-wasm # собрать и прогнать настоящий .hmod в песочнице без GPU
@@ -888,6 +889,17 @@ def play(args):
run([exe, "--resources", resources(), *args], cwd=home)
def web(args):
from web_remote.server import run as run_panel
home = game_home().resolve()
run_panel(
args, game_home=home,
game_command=lambda: [built_game().resolve(), "--resources", resources()],
default_mod_data=home / "horizon-mods" / ".horizon-mod-data" / "airdef",
)
def fork_api():
"""Новейший уровень API форка и его таблица функций (horizon-mods/src/api_level.rs); None без форка."""
try:
@@ -1000,6 +1012,8 @@ def main():
steps = {"fork": fork, "game": game, "mod": mod, "install": install, "check": check, "test-wasm": test_wasm, "test-budgets": test_budgets}
if cmd == "play":
play(rest)
elif cmd == "web":
web(rest)
elif cmd == "all":
for step in ("fork", "game", "mod", "install"):
steps[step]()