1 Commits

8 changed files with 11 additions and 5 deletions
Binary file not shown.
Binary file not shown.
+1 -2
View File
@@ -41,14 +41,13 @@ public class ExploreNode : ProgramNode
private bool TrySelectTarget() private bool TrySelectTarget()
{ {
int safetyCounter = 0; int safetyCounter = 0;
int layerRange = Math.Max(GameData.lowestLayer, 1);
int maximumAttempts = (int)Math.Pow(GameData.layerSize, 2) * 2; int maximumAttempts = (int)Math.Pow(GameData.layerSize, 2) * 2;
while (safetyCounter <= maximumAttempts) while (safetyCounter <= maximumAttempts)
{ {
targetPosition = new Vector3I( targetPosition = new Vector3I(
GameData.rand.Next(GameData.layerSize), GameData.rand.Next(GameData.layerSize),
GameData.rand.Next(layerRange), GameData.rand.Next(GameData.lowestLayer + 1),
GameData.rand.Next(GameData.layerSize) GameData.rand.Next(GameData.layerSize)
); );
if (!GameData.map[targetPosition.Y].tiles[targetPosition.X, targetPosition.Z].wasVisited) if (!GameData.map[targetPosition.Y].tiles[targetPosition.X, targetPosition.Z].wasVisited)
+2 -2
View File
@@ -14,12 +14,12 @@ public class ForNode : ProgramNode
public override NodeResult Execute(Robot robot, double delta) public override NodeResult Execute(Robot robot, double delta)
{ {
bool isConditionFulfilled = DetermineCondition(); bool isConditionFulfilled = DetermineCondition();
amountExecuted++;
if (isConditionFulfilled) if (isConditionFulfilled)
{ {
amountExecuted = 0; amountExecuted = 0;
} }
return isConditionFulfilled ? NodeResult.SUCCESS : NodeResult.CONDITIONFALSE; amountExecuted++;
return isConditionFulfilled ? NodeResult.CONDITIONFALSE : NodeResult.SUCCESS;
} }
private bool DetermineCondition() private bool DetermineCondition()
+1 -1
View File
@@ -24,7 +24,7 @@ public class SurvivalState
public void Update(double delta) public void Update(double delta)
{ {
if (isDead) return; if (isDead || GameData.debugMode) return;
elapsedSeconds += delta; elapsedSeconds += delta;
float drainModifier = IsInGracePeriod() ? 0.35f : 1f; float drainModifier = IsInGracePeriod() ? 0.35f : 1f;
+1
View File
@@ -39,6 +39,7 @@ public partial class CodingWindow : PanelContainer
if (focused is LineEdit || focused is TextEdit) return; if (focused is LineEdit || focused is TextEdit) return;
if (selectedNode == null) return; if (selectedNode == null) return;
if (selectedNode == highlightedNode) highlightedNode = null;
editorWindow.RemoveChild(selectedNode); editorWindow.RemoveChild(selectedNode);
selectedNode.QueueFree(); selectedNode.QueueFree();
} }
+1
View File
@@ -49,6 +49,7 @@ public partial class TutorialBubble : PanelContainer
"The inventory (Default: [I]) stores everything your robots collect. Gates and research both consume items from it.", "The inventory (Default: [I]) stores everything your robots collect. Gates and research both consume items from it.",
"Each gate blocks the next layer. When you have the required items, use Open Gate in the top bar.", "Each gate blocks the next layer. When you have the required items, use Open Gate in the top bar.",
"The required ingredients can be found by hovering over the Open Gate button.", "The required ingredients can be found by hovering over the Open Gate button.",
"You can swap between layers using the [Q] (up one layer) and [E] (down one layer) keys.",
"The map (Default: [M]) shows what your robots have discovered. Exploration matters because resources are hidden in the ruin.", "The map (Default: [M]) shows what your robots have discovered. Exploration matters because resources are hidden in the ruin.",
"Deeper layers contain more advanced resources. Unlocking the gate at the lowest point allows you to leave the ruin.", "Deeper layers contain more advanced resources. Unlocking the gate at the lowest point allows you to leave the ruin.",
"Be careful: resources are not endless at the beginning. Converting a robot to a drill unit with Sacrifice makes them endless.", "Be careful: resources are not endless at the beginning. Converting a robot to a drill unit with Sacrifice makes them endless.",
+5
View File
@@ -270,6 +270,11 @@ public partial class Map : PanelContainer
tooltipText += GetRobotTooltip(robotsOnTile, tooltipText.Length > 0); tooltipText += GetRobotTooltip(robotsOnTile, tooltipText.Length > 0);
} }
if (tile.collapsedMesh == "gate" && tile.wasVisited)
{
tileTexture = AddBorder(tileTexture, Colors.Red, RobotBorderWidth);
}
texture.Texture = tileTexture; texture.Texture = tileTexture;
texture.TooltipText = tooltipText; texture.TooltipText = tooltipText;
} }