Fixed robot save mechanic to include nodes and their states.

This commit is contained in:
2026-06-28 14:00:11 +02:00
parent c29372ca51
commit c84fdf8a0b
10 changed files with 361 additions and 6 deletions
+15
View File
@@ -42,6 +42,21 @@ public class ForNode : ProgramNode
return $"Name: {DisplayText}, AmountExecuted: {amountExecuted}, Amount: {amount}";
}
public override NodeSaveData CreateSaveData()
{
NodeSaveData saveData = base.CreateSaveData();
saveData.Amount = amount;
saveData.AmountExecuted = amountExecuted;
return saveData;
}
public override void Load(NodeSaveData saveData)
{
base.Load(saveData);
amount = saveData.Amount;
amountExecuted = saveData.AmountExecuted;
}
public override void SetNextNode(
List<Godot.Collections.Dictionary> connections,
Dictionary<StringName, ProgramNode> availableNodes