ST5a: one helper finds or adds a check file for both runs (no copied block); the manual's brief and check pages for Scene.beat and over

This commit is contained in:
shinyobjectz committed 2026-11-22 18:03:23 -08:00
1 parent f0372580bb
commit dcb0cf8f49
3 files changed
+13 -9

No files matched your search

+10 -8
View File
@@ -249,10 +249,7 @@ fn check_one(tsx: &Path, id: Option<String>, rules: &[Rule], args: &[String], wh
needs(&mut waits, r);
continue;
}
let k = files.iter().position(|f| *f == m.file).unwrap_or_else(|| {
files.push(m.file.clone());
files.len() - 1
});
let k = file_index(&mut files, &m.file);
let mut on = m.frames.pick(&worlds);
if let (true, Some(j)) = (m.render, &join_on_of(&worlds)) {
on.retain(|f| j.contains(f));
@@ -272,6 +269,14 @@ fn check_one(tsx: &Path, id: Option<String>, rules: &[Rule], args: &[String], wh
Ok(Checked { file: tsx.to_path_buf(), id, found: finding::ranked(found), waits, render, shots, fps })
}
/// Where `f` is in `files`, added at the end when it isn't yet: the one run's checks, each file once.
fn file_index(files: &mut Vec<PathBuf>, f: &Path) -> usize {
files.iter().position(|x| x == f).unwrap_or_else(|| {
files.push(f.to_path_buf());
files.len() - 1
})
}
/// Whether `r` runs on the composition `tsx` (`id` where its file registers several) of `project`: a rule a note's ask
/// scopes to one (`of`) runs there alone.
fn applies(r: &Rule, project: &Path, tsx: &Path, id: Option<&str>) -> bool {
@@ -376,10 +381,7 @@ fn check_story(file: &Path, rules: &[Rule], unread: Vec<Finding>, args: &[String
let Some(f) = r.file() else { continue };
match ts::meta(f, &host.ts) {
Ok(m) if m.story => {
let k = files.iter().position(|x| *x == m.file).unwrap_or_else(|| {
files.push(m.file.clone());
files.len() - 1
});
let k = file_index(&mut files, &m.file);
plan.push(ts::Planned { check: k, frames: Vec::new(), values: r.values.clone(), level: r.level, by: r.by.clone() });
}
Ok(_) => {}
+1 -1
View File
@@ -219,7 +219,7 @@ type RuleLevel = "error" | "warn" | "note"
### `Scene`
```ts
type Scene = { /** * where and when ("INT. SENATE - NIGHT", or "The brief page") */ heading?: string, beats: Array<Beat>, /** * what the scene must land */ payoff?: string, }
type Scene = { /** * where and when ("INT. SENATE - NIGHT", or "The brief page") */ heading?: string, beats: Array<Beat>, /** * what the scene must land */ payoff?: string, /** * the story beat it plays, by its id (raea/story's compileScript writes it; docs/story.feature ST0c) */ beat?: string, }
```
### `Script`
+2
View File
@@ -224,6 +224,7 @@ type Camera = { eye: [number, number, number], look: [number, number, number], /
| `needs` | `"render"` | "render": it reads what only a render has (Contrast, Picture, Mix, Onset, Covers); with none, it waits for one |
| `level` | `Level` | how bad what it finds is, where a finding doesn't say (error when unset) |
| `frames` | `Frames` | where it runs ("all" when unset) |
| `over` | `"frames" \| "story" \| "both"` | what it reads: a composition's frames (the default), a story with no frames (`raea check NAME.story.ts` runs only these and "both", with its `after` alone), or both |
### `CheckFn`
@@ -242,6 +243,7 @@ type CheckFn = (world: World, frame: number, values: Values, memo: Memo) => void
| `needs` | `"render"` | "render": it reads what only a render has (Contrast, Picture, Mix, Onset, Covers); with none, it waits for one |
| `level` | `Level` | how bad what it finds is, where a finding doesn't say (error when unset) |
| `frames` | `Frames` | where it runs ("all" when unset) |
| `over` | `"frames" \| "story" \| "both"` | what it reads: a composition's frames (the default), a story with no frames (`raea check NAME.story.ts` runs only these and "both", with its `after` alone), or both |
### `Clip`