Added new release, updated nodes to contain tooltip text.

This commit is contained in:
2026-05-14 13:02:25 +02:00
parent 588879951d
commit a2acfcefd6
20 changed files with 21 additions and 4 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1
View File
@@ -7,6 +7,7 @@ public class CraftNode : ProgramNode
public CraftNode() public CraftNode()
{ {
DisplayText = "Craft"; DisplayText = "Craft";
TooltipText = "Crafts the selected item the selected amount of times by consuming the required ingredients from the shared inventory.";
} }
public override NodeResult Execute(Robot robot, double delta) public override NodeResult Execute(Robot robot, double delta)
{ {
+1
View File
@@ -11,6 +11,7 @@ public class ExploreNode : ProgramNode
public ExploreNode() public ExploreNode()
{ {
DisplayText = "Explore"; DisplayText = "Explore";
TooltipText = "Explores nearby unknown tiles around the robot and reveals them for future navigation. \rContinues exploration until no unvisited tile is left.";
} }
public override NodeResult Execute(Robot robot, double delta) public override NodeResult Execute(Robot robot, double delta)
+1
View File
@@ -8,6 +8,7 @@ public class ForNode : ProgramNode
public ForNode() public ForNode()
{ {
DisplayText = "For"; DisplayText = "For";
TooltipText = "Repeats the connected branch (Top slot) for the configured amount of executions before continuing through the negative output. (Bottom slot)";
} }
public override NodeResult Execute(Robot robot, double delta) public override NodeResult Execute(Robot robot, double delta)
+1
View File
@@ -5,6 +5,7 @@ public class HarvestNode : ProgramNode
public HarvestNode() public HarvestNode()
{ {
DisplayText = "Harvest"; DisplayText = "Harvest";
TooltipText = "Harvests one unit from the resource on the robot's current tile and adds the result to the shared inventory.";
} }
public override NodeResult Execute(Robot robot, double delta) public override NodeResult Execute(Robot robot, double delta)
+1
View File
@@ -9,6 +9,7 @@ public class IfNode : ProgramNode
public IfNode() public IfNode()
{ {
DisplayText = "If"; DisplayText = "If";
TooltipText = "Checks an inventory condition once. If the condition is true, execution follows the main output (Top slot); otherwise it follows the negative output. (Bottom slot)";
} }
public override NodeResult Execute(Robot robot, double delta) public override NodeResult Execute(Robot robot, double delta)
+1
View File
@@ -7,6 +7,7 @@ public class MaintainNode : ProgramNode
public MaintainNode() public MaintainNode()
{ {
DisplayText = "Maintain"; DisplayText = "Maintain";
TooltipText = "Repairs the robot by consuming one matching gear and restoring a small amount of maintenance.";
} }
public override NodeResult Execute(Robot robot, double delta) public override NodeResult Execute(Robot robot, double delta)
+1
View File
@@ -10,6 +10,7 @@ public class MoveNode : ProgramNode
public MoveNode() public MoveNode()
{ {
DisplayText = "Move"; DisplayText = "Move";
TooltipText = "Moves the robot to the selected map coordinate. The path must be reachable from the robot's current position.";
} }
public override NodeResult Execute(Robot robot, double delta) public override NodeResult Execute(Robot robot, double delta)
+1
View File
@@ -6,6 +6,7 @@ public abstract class ProgramNode
public ProgramNode nextNode; public ProgramNode nextNode;
public ProgramNode NegativeNode; public ProgramNode NegativeNode;
public string DisplayText; public string DisplayText;
public string TooltipText;
public string lastExecutionMessage; public string lastExecutionMessage;
public abstract NodeResult Execute(Robot robot, double delta); public abstract NodeResult Execute(Robot robot, double delta);
+1
View File
@@ -5,6 +5,7 @@ public class SacrificeNode : ProgramNode
public SacrificeNode() public SacrificeNode()
{ {
DisplayText = "Sacrifice"; DisplayText = "Sacrifice";
TooltipText = "Sacrifices the robot on its current tile to turn that tile's resource into an endless resource.";
} }
public override NodeResult Execute(Robot robot, double delta) public override NodeResult Execute(Robot robot, double delta)
+1
View File
@@ -3,6 +3,7 @@ public class StartNode : ProgramNode
public StartNode() public StartNode()
{ {
DisplayText = "Start"; DisplayText = "Start";
TooltipText = "Marks where the robot begins executing the script. Every valid script needs exactly one Start node.";
} }
public override NodeResult Execute(Robot robot, double delta) public override NodeResult Execute(Robot robot, double delta)
+1
View File
@@ -9,6 +9,7 @@ public class WhileNode : ProgramNode
public WhileNode() public WhileNode()
{ {
DisplayText = "While"; DisplayText = "While";
TooltipText = "Repeats the connected branch (Top slot) while the configured inventory condition remains true, then continues through the negative output. (Bottom slot)";
} }
public override NodeResult Execute(Robot robot, double delta) public override NodeResult Execute(Robot robot, double delta)
+7 -1
View File
@@ -618,15 +618,21 @@ public partial class TestRunner : Node
Dictionary<ProgramNode, PackedScene> dslNodes = ResourceLoader.LoadDSLNodes(); Dictionary<ProgramNode, PackedScene> dslNodes = ResourceLoader.LoadDSLNodes();
bool hasStartNode = false; bool hasStartNode = false;
bool allNodesHaveTooltips = true;
foreach (ProgramNode node in dslNodes.Keys) foreach (ProgramNode node in dslNodes.Keys)
{ {
if (node is StartNode) if (node is StartNode)
{ {
hasStartNode = true; hasStartNode = true;
break; }
if (node.TooltipText == null || node.TooltipText.Length <= 0)
{
allNodesHaveTooltips = false;
} }
} }
AssertTrue(hasStartNode, "start node prefab loaded"); AssertTrue(hasStartNode, "start node prefab loaded");
AssertTrue(allNodesHaveTooltips, "dsl nodes have tooltip text");
} }
} }
+1 -1
View File
@@ -103,7 +103,7 @@ public partial class CodingWindow : PanelContainer
}; };
nodeListButton.MouseEntered += () => nodeListButton.MouseEntered += () =>
{ {
nodeTooltip.ShowTooltip(nodeTemplate.DisplayText, nodeTemplate.DisplayText, nodeListButton); nodeTooltip.ShowTooltip(nodeTemplate.DisplayText, nodeTemplate.TooltipText, nodeListButton);
}; };
nodeListButton.MouseExited += () => nodeListButton.MouseExited += () =>
{ {
+1 -1
View File
@@ -10,10 +10,10 @@ public partial class NodeTooltip : PanelContainer
public void ShowTooltip(string titleText, string descriptionText, Button button) public void ShowTooltip(string titleText, string descriptionText, Button button)
{ {
Show();
title.Text = titleText; title.Text = titleText;
image.Texture = ResourceLoader.LoadDSLTooltip(titleText); image.Texture = ResourceLoader.LoadDSLTooltip(titleText);
description.Text = descriptionText; description.Text = descriptionText;
Show();
Position = button.GlobalPosition - spacing - new Vector2(Size.X, Size.Y/2); Position = button.GlobalPosition - spacing - new Vector2(Size.X, Size.Y/2);
} }
+1 -1
View File
@@ -39,7 +39,7 @@ public partial class TutorialBubble : PanelContainer
"You do not walk through the ruin yourself. Your robots explore, harvest, craft and carry progress for you.", "You do not walk through the ruin yourself. Your robots explore, harvest, craft and carry progress for you.",
"The top bar shows survival pressure: energy, water and food. If those run out, the expedition ends.", "The top bar shows survival pressure: energy, water and food. If those run out, the expedition ends.",
"The necessary resources will be auto-consumed during your time here.", "The necessary resources will be auto-consumed during your time here.",
"For energy: steam, battery v1 and battery v2. For thirst: water. For food: mushrooms.", "For energy: coal, steam, battery v1 and battery v2. For thirst: water. For food: mushrooms.",
"Try to keep a stock of those items to avoid dying in this ruin.", "Try to keep a stock of those items to avoid dying in this ruin.",
"Open the robot panel (Default: [R]) to inspect your robots. A robot can overheat, lose maintenance and slow down if ignored.", "Open the robot panel (Default: [R]) to inspect your robots. A robot can overheat, lose maintenance and slow down if ignored.",
"An overheated robot has to cool down for a while and cannot execute scripts.", "An overheated robot has to cool down for a while and cannot execute scripts.",