(WIP) Switch from previous DSL System (UI order based) to a new DSL System (node connection based) still in Progress.
This commit is contained in:
@@ -35,6 +35,7 @@ public partial class TestRunner : Node
|
||||
Run("If node evaluates inventory comparisons", TestIfNodeEvaluatesInventoryComparisons);
|
||||
Run("While node reports false conditions", TestWhileNodeReportsFalseConditions);
|
||||
Run("For node stops after configured amount", TestForNodeStopsAfterConfiguredAmount);
|
||||
Run("Start node succeeds immediately", TestStartNodeSucceedsImmediately);
|
||||
Run("Paused world does not drain survival", TestPausedWorldDoesNotDrainSurvival);
|
||||
Run("Open gate hides gate content", TestOpenGateHidesGateContent);
|
||||
Run("Layer generation succeeds above threshold", TestLayerGenerationSuccessRate);
|
||||
@@ -476,6 +477,14 @@ public partial class TestRunner : Node
|
||||
AssertEqual(NodeResult.CONDITIONFALSE, node.Execute(null, 0), "loop finished");
|
||||
}
|
||||
|
||||
private void TestStartNodeSucceedsImmediately()
|
||||
{
|
||||
StartNode node = new StartNode();
|
||||
|
||||
AssertEqual(NodeResult.SUCCESS, node.Execute(null, 0), "start should succeed");
|
||||
AssertEqual("Name: Start", node.Save(), "start save");
|
||||
}
|
||||
|
||||
private void TestPausedWorldDoesNotDrainSurvival()
|
||||
{
|
||||
GameData.isPaused = true;
|
||||
@@ -549,6 +558,18 @@ public partial class TestRunner : Node
|
||||
AssertTrue(GameData.availableItems.ContainsKey("water"), "water item loaded");
|
||||
AssertTrue(GameData.availableResearch.ContainsKey("basics"), "basics research loaded");
|
||||
AssertTrue(GameData.availableResearch.ContainsKey("iron_robotics"), "iron robotics research loaded");
|
||||
|
||||
Dictionary<ProgramNode, PackedScene> dslNodes = ResourceLoader.LoadDSLNodes();
|
||||
bool hasStartNode = false;
|
||||
foreach (ProgramNode node in dslNodes.Keys)
|
||||
{
|
||||
if (node is StartNode)
|
||||
{
|
||||
hasStartNode = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
AssertTrue(hasStartNode, "start node prefab loaded");
|
||||
}
|
||||
|
||||
private Layer CreateTestLayer(int level, string collapsedMesh)
|
||||
|
||||
Reference in New Issue
Block a user