A list variable with an item type only kept its shape in the editor.
A graph could write any list into it at runtime, and the List node had
no type at all. Now the declaration decides what a write may store.
- Writing a list into a typed list variable leaves out every item that
does not have exactly the fields of the type. The rest is written and
the console names each item that was left out, like Add item does.
- The same rule holds for typed list fields inside a struct variable
and for lists inside typed items, at any depth.
- A typed struct variable refuses a struct with a field the type does
not have, and a value that is no struct. A struct with missing fields
still merges in as before, so a partial Pack keeps working.
- The check runs in the Variables node (own variables and Variables
assets) and in the Properties node when it sets a behavior variable
of another object.
- Ports learn their declaration through GraphLookup: what a variable
declares about its type, and which behavior owns a graph. The rule
itself lives in the new src/core/graph/typedValues.ts, fitsType moved
there from SetItem.
- The List node gets a Type setting. With a type its items are shaped
and marked, follow the struct asset, count when the type is deleted
and offer Split into fields in For each. The mark never reaches the
running game.
- A type on a List node holding something other than structs is
refused with a console line.
- Setting the List node back to None removes the marks, unlike a list
variable. A node list has no per-item type row, so marked items could
never be freed there. Undo brings everything back.
- tests/core/kinds.test.ts looked for the value as the first parameter
of a literal. Type now comes first on the List node, so the test
finds the value by its key.
Tests:
- Gate: 198 files, 2869 tests (2856 + 13), CHECK EXIT 0
- e2e 55: 19 checks (+55j write at runtime, +2 for 55k List node)
- e2e 54: 16 checks, smokes 24 / 19 / 21
- Five mutations, each fails between 1 and 4 tests
- e2e total 1606 is computed (1603 + 3), no full run
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>