feat: add mod editing, revision merges and secure game storage

Add immutable revisions, PGVN editor, asset replacement, merge and rebase workflows, authenticated media delivery and reachability GC. Harden the script interpreter, pin unrpyc and remove tracked build metadata. Include current compatibility checks, Naninovel import and regression tests.
This commit is contained in:
mrleo1nid committed 2026-10-25 04:42:48 +03:00
1 parent 06ff19ac4a
commit c8d83b3fe7
65 files changed
+3825 -68

No files matched your search

+7 -5
View File
@@ -8,6 +8,7 @@
import hashlib
import re
from uuid import uuid4
from collections import Counter, defaultdict
from dataclasses import dataclass, field
from pathlib import Path
@@ -90,20 +91,21 @@ def assign_ids(modules: dict[str, list[dict[str, Any]]]) -> dict[tuple[str, int]
by_line: dict[tuple[str, int], dict] = {}
used: Counter = Counter()
for file, labels in modules.items():
n = 0
for label in labels:
label.setdefault("id", str(uuid4()))
group = label["name"]
for node in walk(label["body"]):
n += 1
node["id"] = short_hash(f"{file}:{n}")
node.setdefault("id", str(uuid4()))
for branch in node.get("branches", []) + node.get("items", []):
branch.setdefault("id", str(uuid4()))
if node.get("op") == "label":
group = node["name"]
if node.get("op") != "say":
if node.get("op") not in {"say", "nani_add_choice"}:
continue
# Ren'Py style: <label>_<hash of the line>, de-duplicated
base = f"{group}_{short_hash((node.get('who') or '') + chr(0) + node['what'])}"
used[base] += 1
node["tid"] = base if used[base] == 1 else f"{base}_{used[base] - 1}"
node.setdefault("tid", base if used[base] == 1 else f"{base}_{used[base] - 1}")
node["_group"] = group
if "_ln" in node:
by_line[(file, node["_ln"])] = node