Skip to content

Updated SetVariableNode to support reference value variables and array variables.#28

Merged
lextatic merged 4 commits into
mainfrom
task/added-reference-values-to-set-variable-node
May 16, 2026
Merged

Updated SetVariableNode to support reference value variables and array variables.#28
lextatic merged 4 commits into
mainfrom
task/added-reference-values-to-set-variable-node

Conversation

@lextatic

Copy link
Copy Markdown
Contributor

Changed

  • Updated SetVariableNode to support reference value variables and array variables.

@lextatic lextatic added the changed Changes in existing functionality label May 16, 2026
@lextatic lextatic requested a review from Copilot May 16, 2026 20:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates SetVariableNode so it can write to the existing target variable kind instead of only scalar Variant128 graph/shared variables.

Changes:

  • Added runtime reference/reference-array lookup and mutation helpers.
  • Expanded SetVariableNode execution to handle scalar values, value arrays, reference values, and reference arrays.
  • Added tests and documentation for reference-variable support.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
Forge/Statescript/Variables.cs Adds runtime type helpers for reference variables and reference arrays.
Forge/Statescript/GraphContext.cs Adds runtime type overloads for resolving reference values and arrays.
Forge/Statescript/Nodes/Action/SetVariableNode.cs Resolves target kind and writes using the matching variable API.
Forge.Tests/Statescript/Nodes/Action/SetVariableNodeTests.cs Adds SetVariableNode tests for reference values/arrays and shared reference targets.
docs/statescript/variables.md Documents SetVariableNode target-kind behavior.
docs/statescript/nodes/action/set-variable-node.md Updates SetVariableNode behavior notes.
.editorconfig Changes default indentation style to tabs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .editorconfig
Comment thread Forge/Statescript/Variables.cs Outdated
Comment thread Forge/Statescript/Nodes/Action/SetVariableNode.cs
Comment thread Forge/Statescript/Nodes/Action/SetVariableNode.cs
@lextatic lextatic merged commit 5caf359 into main May 16, 2026
1 check passed
@lextatic lextatic deleted the task/added-reference-values-to-set-variable-node branch May 16, 2026 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changed Changes in existing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants