diff --git a/Scripts/Crafting/Inventory.cs b/Scripts/Crafting/Inventory.cs index 5df9455..cdcce26 100644 --- a/Scripts/Crafting/Inventory.cs +++ b/Scripts/Crafting/Inventory.cs @@ -12,7 +12,6 @@ public class Inventory Item inventoryItem = items.Find(x => x.data.Id == item.data.Id && x.currentAmount + amount <= x.data.StackSize); if (inventoryItem != null) { - GD.Print(items.IndexOf(inventoryItem) + ": " + inventoryItem.currentAmount); inventoryItem.currentAmount += amount; return true; } diff --git a/Scripts/DSL/Nodes/ExploreNode.cs b/Scripts/DSL/Nodes/ExploreNode.cs index b5320f0..5ffa469 100644 --- a/Scripts/DSL/Nodes/ExploreNode.cs +++ b/Scripts/DSL/Nodes/ExploreNode.cs @@ -12,13 +12,13 @@ public class ExploreNode : ProgramNode DisplayText = "Explore"; } public override NodeResult Execute(Robot robot, double delta) - { + { if (pathPoints == null) { int safetyCounter = 0; while (true) { - targetPosition = new Vector3I(GameData.rand.Next(GameData.layerSize), GameData.currentLayer, GameData.rand.Next(GameData.layerSize)); + targetPosition = new Vector3I(GameData.rand.Next(GameData.layerSize), GameData.rand.Next(GameData.lowestLayer), GameData.rand.Next(GameData.layerSize)); if (!GameData.map[targetPosition.Y].tiles[targetPosition.X, targetPosition.Z].wasVisited) break; safetyCounter++; if (safetyCounter > Math.Pow(GameData.layerSize, 2) * 2) @@ -33,7 +33,7 @@ public class ExploreNode : ProgramNode if (pathPoints.Count <= 0) { - lastExecutionMessage = "No path available"; + lastExecutionMessage = $"No path available {targetPosition}"; return NodeResult.FAILURE; } diff --git a/Scripts/Helpers/GameData.cs b/Scripts/Helpers/GameData.cs index 1131dd0..98a4bfa 100644 --- a/Scripts/Helpers/GameData.cs +++ b/Scripts/Helpers/GameData.cs @@ -11,6 +11,7 @@ public partial class GameData public static int currentLayer = 0; //The layer that is currently visible public static int visibleLayer = 0; + public static int lowestLayer = 0; //Determines if the player can move the camera or not (Necessary for input and options menu) public static bool canMove = true; public static int maxRobotCount = 1000; diff --git a/Scripts/Research/ResearchList.cs b/Scripts/Research/ResearchList.cs index e490af8..ecd1c39 100644 --- a/Scripts/Research/ResearchList.cs +++ b/Scripts/Research/ResearchList.cs @@ -50,7 +50,6 @@ public partial class ResearchList : PanelContainer { foreach (Research research in GameData.availableResearch.Values) { - GD.Print(research.state); GraphNode node = CreateResearchNode( research.data.Id, research.data.Texture, diff --git a/Scripts/WorldGeneration/Tile.cs b/Scripts/WorldGeneration/Tile.cs index 43a3b5e..efa870e 100644 --- a/Scripts/WorldGeneration/Tile.cs +++ b/Scripts/WorldGeneration/Tile.cs @@ -144,5 +144,6 @@ public partial class Tile { wasVisited = true; OnTileVisited?.Invoke(this, EventArgs.Empty); + ContentNode.Visible = true; } } diff --git a/Scripts/WorldGeneration/World.cs b/Scripts/WorldGeneration/World.cs index d3a4ab0..67bc3d7 100644 --- a/Scripts/WorldGeneration/World.cs +++ b/Scripts/WorldGeneration/World.cs @@ -47,10 +47,8 @@ public partial class World : Node3D HandleRenderData(BuildRenderData(0)); - //TODO: Remove for live build -> DEBUG ONLY - Robot robot = ResourceLoader.LoadRobotPrefab().Instantiate(); - robot.Name = $"Robot #{robots.Count + 1}"; + robot.Name = "Bob"; robot.Position = map[0].tiles[0, 0].Position; AddChild(robot); robots.Add(robot);