Hotfix for some DSL bugs (For node not working, Exploration not taking next layers into account)

This commit is contained in:
2026-05-19 20:59:15 +02:00
parent dc3912fa70
commit 121cc1eb03
8 changed files with 11 additions and 5 deletions
+1 -2
View File
@@ -41,14 +41,13 @@ public class ExploreNode : ProgramNode
private bool TrySelectTarget()
{
int safetyCounter = 0;
int layerRange = Math.Max(GameData.lowestLayer, 1);
int maximumAttempts = (int)Math.Pow(GameData.layerSize, 2) * 2;
while (safetyCounter <= maximumAttempts)
{
targetPosition = new Vector3I(
GameData.rand.Next(GameData.layerSize),
GameData.rand.Next(layerRange),
GameData.rand.Next(GameData.lowestLayer + 1),
GameData.rand.Next(GameData.layerSize)
);
if (!GameData.map[targetPosition.Y].tiles[targetPosition.X, targetPosition.Z].wasVisited)