- Add app/games: GameProfile base, registry, ReaderHooks and renpy/naninovel/ tomie profiles. pipeline, preflight, detect and mods dispatch via the registry - Move tomie_* converter modules to app/games/tomie and split out reader hooks, import, mod validation and known defects - Tolerate the 31 authoring defects of the pinned Tomie build as report warnings (exact list, per-script counts); any new defect still blocks import - Frontend: runtime registry (runtimes.ts) with lazy Tomie launcher - Add profile/registry tests and docs/GAME_PROFILES.md; update IMPORT.md Full media export of the original Tomie build is not yet verified. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
23 lines
832 B
Python
23 lines
832 B
Python
"""Extension points of the shared Unity/Naninovel reader for game-specific profiles."""
|
|
from __future__ import annotations
|
|
|
|
from typing import Any
|
|
|
|
|
|
class ReaderHooks:
|
|
"""Default hooks: a plain Naninovel game. Profiles subclass and override."""
|
|
|
|
def begin(self, package: Any, root: Any) -> None:
|
|
"""Called once before the Unity data is scanned."""
|
|
|
|
def accept_duplicate_script(self, name: str) -> bool:
|
|
"""Return True to keep the first copy of a script that appears twice with different content."""
|
|
return False
|
|
|
|
def scan_object(self, package: Any, obj: Any, ctx: Any) -> bool:
|
|
"""Offer a Unity object to the profile. Return True when it was handled.
|
|
|
|
``ctx`` has ``root``, ``source``, ``media`` and ``codec()`` (lazily created script codec).
|
|
"""
|
|
return False
|