Fixed robot save mechanic to include nodes and their states.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user