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

+2 -1
View File
@@ -1287,7 +1287,8 @@ export class ScreenManager {
/** `at` transforms: static properties now, animated ones through the ATL runner. */
private transforms(el: HTMLElement, props: Record<string, Expr>, ctx: Ctx) {
const specs: AtSpec[] = Array.isArray((props as any).at) ? (props as any).at : [];
const pick = (spec: AtSpec): AtSpec => (spec.choose ? pick(truthy(this.ev(spec.choose.c)) ? spec.choose.then : spec.choose.else) : spec);
const specs: AtSpec[] = Array.isArray((props as any).at) ? (props as any).at.map(pick) : [];
const live: Props = {};
const apply = (p: Props) => {
const zoom = (p.zoom ?? 1);
+2
View File
@@ -54,6 +54,8 @@ export interface Layer {
}
export interface AtSpec {
/** `at (a if cond else b)`: the entry is chosen each time the screen is drawn. */
choose?: { c: Expr; then: AtSpec; else: AtSpec };
pos?: string;
name?: string;
props?: Record<string, any>;