(WIP) Switch from previous DSL System (UI order based) to a new DSL System (node connection based) still in Progress.

This commit is contained in:
2026-05-13 22:21:16 +02:00
parent 5893f9f7b9
commit 33a618b0b9
19 changed files with 273 additions and 78 deletions
+24
View File
@@ -1,4 +1,5 @@
using Godot;
using System.Collections.Generic;
public class ForNode : ProgramNode
{
@@ -34,4 +35,27 @@ public class ForNode : ProgramNode
{
return $"Name: {DisplayText}, AmountExecuted: {amountExecuted}, Amount: {amount}";
}
public override void SetNextNode(
List<Godot.Collections.Dictionary> connections,
Dictionary<StringName, ProgramNode> availableNodes
)
{
nextNode = null;
NegativeNode = null;
foreach (Godot.Collections.Dictionary connection in connections)
{
int port = (int)connection["from_port"];
ProgramNode connectedNode = GetConnectedNode(connection, availableNodes);
if (port == 0)
{
nextNode = connectedNode;
}
else
{
NegativeNode = connectedNode;
}
}
}
}