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:
1 parent
f2fcd05467
commit
e66160cffa
12 files changed
+176
-31
No files matched your search
@@ -246,3 +246,16 @@ def test_dynamic_at_value_and_draggable_box():
|
||||
body = data.screens["s"]["body"]
|
||||
assert body[0]["props"]["at"][0]["dyn"]["k"] == "sub"
|
||||
assert body[1]["w"] == "drag" and "draggable" in body[1]["props"]
|
||||
|
||||
|
||||
def test_input_widget_values_and_focus_actions_are_accepted():
|
||||
data = parse('screen s():\n default name_value = VariableInputValue("name")\n input:\n id "player_name_input"\n'
|
||||
' value name_value\n length 12\n input:\n default "Bob"\n allow "ab"\n'
|
||||
' textbutton "x" action [name_value.Toggle(), Confirm("sure?", yes=NullAction()), CaptureFocus("tip")]\n'
|
||||
' for i in [1, 2]:\n if i == 1:\n continue\n text "[i]"\n'
|
||||
'label start:\n call screen s\n')
|
||||
audit_ir(data)
|
||||
require_supported_scripts(data)
|
||||
body = data.screens["s"]["body"]
|
||||
assert [n.get("w") for n in body[:3]] == ["input", "input", "textbutton"]
|
||||
assert "default" in body[1]["props"] and "value" in body[0]["props"]
|
||||
Reference in new issue
Block a user