feat: conditional "at" transforms in screens and comma-separated ATL statements
CI / frontend (push) Failing after 18s
CI / backend (push) Failing after 35s

`frame at (a if cond else b)` is kept as a choice that the player resolves each time the screen is
drawn. An ATL line splits at top-level commas into separate statements, so `zoom 1.2, 0.2` is a zoom
followed by a 0.2s pause, as Ren'Py compiles it (two-value properties such as `pos 0.5, 0.5` stay
whole). The inert events deselected/unselected, which Ren'Py never sends, are accepted. With the
build profile for The Only Doe 0.05 the game now passes the strict script check.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
mrleo1nidandClaude Sonnet 5.5 committed 2026-10-26 03:21:55 +03:00
1 parent 0822c76321
commit b3f435f416
5 files changed
+85 -3

No files matched your search

+16
View File
@@ -178,3 +178,19 @@ def test_mousearea_is_a_leaf_with_hover_actions():
require_supported_scripts(data)
node = data.screens["s"]["body"][0]
assert node["w"] == "mousearea" and {"hovered", "unhovered", "xysize"} <= set(node["props"])
def test_at_picks_a_transform_by_condition_and_atl_commas_split_statements():
data = parse('transform grow:\n zoom 1.0\n on selected:\n zoom 1.2, 0.2\n on deselected:\n'
' zoom 1.0, 0.2\ntransform still:\n zoom 1.0\n'
'screen s(flag):\n frame at (grow if flag else still):\n text "x"\n'
'label start:\n call screen s(True)\n')
audit_ir(data)
require_supported_scripts(data)
node = data.screens["s"]["body"][0]
choice = node["props"]["at"][0]["choose"]
assert choice["then"]["name"] == "grow" and choice["else"]["name"] == "still"
steps = data.atl["grow"]["steps"]
handler = steps[1]["block"]["steps"]
assert [s["op"] for s in handler] == ["set", "pause"] and handler[1]["t"] == 0.2
assert steps[1]["events"] == ["selected"] and steps[2]["events"] == ["deselected"]