aps-agent/scripts/generate_demo_pack.py

26 lines
823 B
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# ============================================================
# 生成演示数据包:seed 构建器 → server/data/packs/demo.json
# 用法:python scripts/generate_demo_pack.py
# ============================================================
from __future__ import annotations
import os
import sys
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from server.state.seed import build_demo_world
from server.state.packs import export_pack, PACKS_DIR
def main() -> None:
world = build_demo_world()
path = os.path.join(PACKS_DIR, "demo.json")
export_pack(world, path, name="演示工厂",
description="智能控制器装配演示厂(3产线+柔性能力池),由 seed 构建器生成")
print(f"OK -> {path}")
if __name__ == "__main__":
main()