fix: import complete sash combine chains and sync isolated db prototypes
This commit is contained in:
@@ -464,14 +464,16 @@ def build_ava2_items(output: Path, pack_tool: Path):
|
||||
"locked": len(report["locked"]), "assets": report["assets"], "pack": "ava2items"}
|
||||
|
||||
|
||||
def build_ava2_maps(output: Path, pack_tool: Path):
|
||||
def build_ava2_maps(output: Path, pack_tool: Path, ava_root: Path = None):
|
||||
"""AVA2 maps/dungeons + their monsters, layered over ava2items (see tools/server/ava2-maps)."""
|
||||
import importlib.util
|
||||
root = REPO / "tools/server/ava2-maps"
|
||||
ava = REPO.parent / "AVA2/TEST"
|
||||
ava = ava_root or REPO.parent / "AVA2"
|
||||
if ava_root is None and not (ava / "2. Backup SF+SRC and SQL/home/srv1").is_dir():
|
||||
ava = ava / "TEST"
|
||||
reader = REPO.parent / "metin2-server/src/server/db/src/ProtoReader.cpp"
|
||||
if not (ava / "1. Client DEV/pack_maker").is_dir() or not reader.is_file():
|
||||
raise ValueError("AVA2 maps need ../AVA2/TEST (pack_maker + extracted server tree) and ../metin2-server")
|
||||
raise ValueError("AVA2 maps need pack_maker + extracted server tree (use --ava2-maps-root) and ../metin2-server")
|
||||
tools = [tool(name) for name in ("mob_proto_patch", "gr2_textures")]
|
||||
if not all(path.is_file() for path in tools):
|
||||
raise ValueError("build mob_proto_patch and gr2_textures before generating the Chinese client")
|
||||
@@ -529,13 +531,15 @@ def main():
|
||||
parser.add_argument("--proto-tool", type=Path, default=tool("locale_proto_patch"))
|
||||
parser.add_argument("--pack-tool", type=Path, default=tool("eterpack_pack"))
|
||||
parser.add_argument("--name-tables", type=Path, default=DEFAULT_NAMES)
|
||||
parser.add_argument("--ava2-maps-root", type=Path,
|
||||
help="AVA2 reference root containing pack_maker and the extracted server tree")
|
||||
args = parser.parse_args()
|
||||
report_path = build(args.english, args.chinese, args.output, args.client_base,
|
||||
args.proto_tool, args.name_tables, args.pack_tool)
|
||||
report = json.loads(report_path.read_text())
|
||||
report["biolog"] = build_biolog(args.output, args.pack_tool)
|
||||
report["ava2_items"] = build_ava2_items(args.output, args.pack_tool)
|
||||
report["ava2_maps"] = build_ava2_maps(args.output, args.pack_tool)
|
||||
report["ava2_maps"] = build_ava2_maps(args.output, args.pack_tool, args.ava2_maps_root)
|
||||
report["wiki"] = build_wiki(args.output, args.pack_tool)
|
||||
report_path.write_text(json.dumps(report, ensure_ascii=False, indent=2)+"\n", encoding="utf-8")
|
||||
print(f"Built {args.output / 'pack/locale_zh.eix'} (.epk), registered in pack/Index")
|
||||
|
||||
Reference in New Issue
Block a user