feat: converter accepts the constructs of goodluke and SaintlyCorruption

`init -490 screen`, `import x as y` and `from m import A as B`, classes with @renpy.pure, pickle hooks
on classes, `*` items in tuples and lists, generator functions (yield statements; the player runs them
to the end), multi-line expressions that need brackets, Null() and Animation() images, images given as
expressions (`"path/{}.png".format(x)`, f-strings), window statements in init, `offset` in ATL, input
widgets with their values and the focus/confirm actions, `continue` and `break` in screens, `drag`
and DiamondBox-style `fixed` with cell_size, `getattr(...)()` calls, transforms called with arguments,
and the whitelist for the new runtime. JSON files of a game are shipped as data files. Also fixes
blocking_names failing on a call of a call during full conversion.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
mrleo1nidandClaude Sonnet 5.5 committed 2026-10-26 17:28:13 +03:00
1 parent f2fcd05467
commit e66160cffa
12 files changed
+176 -31

No files matched your search

+3 -1
View File
@@ -223,6 +223,8 @@ class AtlParser:
if key == "offset": # `offset (x, y)` is xoffset and yoffset together
if isinstance(value, (list, tuple)) and len(value) == 2:
out["xoffset"], out["yoffset"] = value
elif isinstance(value, dict) and value.get("e", {}).get("k") in ("tuple", "list") and len(value["e"]["v"]) == 2: # `offset (0, -LIFT)`: each half is computed
out["xoffset"], out["yoffset"] = ({"e": half} for half in value["e"]["v"])
else:
self.warn("Не поддерживается ATL: offset не пара чисел", line)
continue
@@ -307,7 +309,7 @@ class AtlParser:
seconds = self.number(first, line) # `delays[1]`: a number picked from a list
if seconds is not None:
steps.append({"op": "pause", "t": seconds})
elif first in POSITION_PROPS or ((g := GLUED.match(first)) and g[1] in POSITION_PROPS):
elif first in POSITION_PROPS or first == "offset" or ((g := GLUED.match(first)) and g[1] in POSITION_PROPS):
props = self.props(parts, line)
if props:
steps.append({"op": "set", "props": props})