diff --git a/Exports/Linux/Release_Linux.zip b/Exports/Linux/Release_Linux.zip deleted file mode 100644 index 9b628fd..0000000 Binary files a/Exports/Linux/Release_Linux.zip and /dev/null differ diff --git a/Exports/Linux/game.x86_64 b/Exports/Linux/game.x86_64 index b511d13..763f5a8 100755 Binary files a/Exports/Linux/game.x86_64 and b/Exports/Linux/game.x86_64 differ diff --git a/Exports/Windows/Release_Windows.zip b/Exports/Windows/Release_Windows.zip deleted file mode 100644 index 12b71c2..0000000 Binary files a/Exports/Windows/Release_Windows.zip and /dev/null differ diff --git a/Exports/Windows/game.exe b/Exports/Windows/game.exe index e86145e..47cc3ce 100644 Binary files a/Exports/Windows/game.exe and b/Exports/Windows/game.exe differ diff --git a/Exports/Windows/game.pck b/Exports/Windows/game.pck deleted file mode 100644 index 6958b93..0000000 Binary files a/Exports/Windows/game.pck and /dev/null differ diff --git a/Scripts/DSL/Nodes/CraftNode.cs b/Scripts/DSL/Nodes/CraftNode.cs index 1f2164b..411f8d9 100644 --- a/Scripts/DSL/Nodes/CraftNode.cs +++ b/Scripts/DSL/Nodes/CraftNode.cs @@ -7,6 +7,7 @@ public class CraftNode : ProgramNode public CraftNode() { 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) { diff --git a/Scripts/DSL/Nodes/ExploreNode.cs b/Scripts/DSL/Nodes/ExploreNode.cs index 7ee42db..1339a71 100644 --- a/Scripts/DSL/Nodes/ExploreNode.cs +++ b/Scripts/DSL/Nodes/ExploreNode.cs @@ -11,6 +11,7 @@ public class ExploreNode : ProgramNode public ExploreNode() { 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) diff --git a/Scripts/DSL/Nodes/ForNode.cs b/Scripts/DSL/Nodes/ForNode.cs index 8a623aa..177a988 100644 --- a/Scripts/DSL/Nodes/ForNode.cs +++ b/Scripts/DSL/Nodes/ForNode.cs @@ -8,6 +8,7 @@ public class ForNode : ProgramNode public ForNode() { 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) diff --git a/Scripts/DSL/Nodes/HarvestNode.cs b/Scripts/DSL/Nodes/HarvestNode.cs index fd1d9c1..527874a 100644 --- a/Scripts/DSL/Nodes/HarvestNode.cs +++ b/Scripts/DSL/Nodes/HarvestNode.cs @@ -5,6 +5,7 @@ public class HarvestNode : ProgramNode public HarvestNode() { 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) diff --git a/Scripts/DSL/Nodes/IfNode.cs b/Scripts/DSL/Nodes/IfNode.cs index b57e533..e21bdbf 100644 --- a/Scripts/DSL/Nodes/IfNode.cs +++ b/Scripts/DSL/Nodes/IfNode.cs @@ -9,6 +9,7 @@ public class IfNode : ProgramNode public IfNode() { 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) diff --git a/Scripts/DSL/Nodes/MaintainNode.cs b/Scripts/DSL/Nodes/MaintainNode.cs index 0c4e953..9f4cca0 100644 --- a/Scripts/DSL/Nodes/MaintainNode.cs +++ b/Scripts/DSL/Nodes/MaintainNode.cs @@ -7,6 +7,7 @@ public class MaintainNode : ProgramNode public MaintainNode() { 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) diff --git a/Scripts/DSL/Nodes/MoveNode.cs b/Scripts/DSL/Nodes/MoveNode.cs index 0bb808d..9e7b7e9 100644 --- a/Scripts/DSL/Nodes/MoveNode.cs +++ b/Scripts/DSL/Nodes/MoveNode.cs @@ -10,6 +10,7 @@ public class MoveNode : ProgramNode public MoveNode() { 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) diff --git a/Scripts/DSL/Nodes/ProgramNode.cs b/Scripts/DSL/Nodes/ProgramNode.cs index e150dae..c346c78 100644 --- a/Scripts/DSL/Nodes/ProgramNode.cs +++ b/Scripts/DSL/Nodes/ProgramNode.cs @@ -6,6 +6,7 @@ public abstract class ProgramNode public ProgramNode nextNode; public ProgramNode NegativeNode; public string DisplayText; + public string TooltipText; public string lastExecutionMessage; public abstract NodeResult Execute(Robot robot, double delta); diff --git a/Scripts/DSL/Nodes/SacrificeNode.cs b/Scripts/DSL/Nodes/SacrificeNode.cs index 3ecd526..1405a6a 100644 --- a/Scripts/DSL/Nodes/SacrificeNode.cs +++ b/Scripts/DSL/Nodes/SacrificeNode.cs @@ -5,6 +5,7 @@ public class SacrificeNode : ProgramNode public SacrificeNode() { 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) diff --git a/Scripts/DSL/Nodes/StartNode.cs b/Scripts/DSL/Nodes/StartNode.cs index c0e5c1a..545b793 100644 --- a/Scripts/DSL/Nodes/StartNode.cs +++ b/Scripts/DSL/Nodes/StartNode.cs @@ -3,6 +3,7 @@ public class StartNode : ProgramNode public StartNode() { 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) diff --git a/Scripts/DSL/Nodes/WhileNode.cs b/Scripts/DSL/Nodes/WhileNode.cs index 519ed23..f35cd62 100644 --- a/Scripts/DSL/Nodes/WhileNode.cs +++ b/Scripts/DSL/Nodes/WhileNode.cs @@ -9,6 +9,7 @@ public class WhileNode : ProgramNode public WhileNode() { 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) diff --git a/Scripts/Tests/TestRunner.cs b/Scripts/Tests/TestRunner.cs index 6c8d28d..82f3645 100644 --- a/Scripts/Tests/TestRunner.cs +++ b/Scripts/Tests/TestRunner.cs @@ -618,15 +618,21 @@ public partial class TestRunner : Node Dictionary dslNodes = ResourceLoader.LoadDSLNodes(); bool hasStartNode = false; + bool allNodesHaveTooltips = true; foreach (ProgramNode node in dslNodes.Keys) { if (node is StartNode) { hasStartNode = true; - break; + } + + if (node.TooltipText == null || node.TooltipText.Length <= 0) + { + allNodesHaveTooltips = false; } } AssertTrue(hasStartNode, "start node prefab loaded"); + AssertTrue(allNodesHaveTooltips, "dsl nodes have tooltip text"); } } diff --git a/Scripts/UI/DSL/CodingWindow.cs b/Scripts/UI/DSL/CodingWindow.cs index d463c89..914f6cb 100644 --- a/Scripts/UI/DSL/CodingWindow.cs +++ b/Scripts/UI/DSL/CodingWindow.cs @@ -103,7 +103,7 @@ public partial class CodingWindow : PanelContainer }; nodeListButton.MouseEntered += () => { - nodeTooltip.ShowTooltip(nodeTemplate.DisplayText, nodeTemplate.DisplayText, nodeListButton); + nodeTooltip.ShowTooltip(nodeTemplate.DisplayText, nodeTemplate.TooltipText, nodeListButton); }; nodeListButton.MouseExited += () => { diff --git a/Scripts/UI/DSL/NodeTooltip.cs b/Scripts/UI/DSL/NodeTooltip.cs index 2b4546c..ad096a0 100644 --- a/Scripts/UI/DSL/NodeTooltip.cs +++ b/Scripts/UI/DSL/NodeTooltip.cs @@ -10,10 +10,10 @@ public partial class NodeTooltip : PanelContainer public void ShowTooltip(string titleText, string descriptionText, Button button) { + Show(); title.Text = titleText; image.Texture = ResourceLoader.LoadDSLTooltip(titleText); description.Text = descriptionText; - Show(); Position = button.GlobalPosition - spacing - new Vector2(Size.X, Size.Y/2); } diff --git a/Scripts/UI/Tutorial/TutorialBubble.cs b/Scripts/UI/Tutorial/TutorialBubble.cs index 4783535..3be5a19 100644 --- a/Scripts/UI/Tutorial/TutorialBubble.cs +++ b/Scripts/UI/Tutorial/TutorialBubble.cs @@ -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.", "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.", - "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.", "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.",