Quellcode durchsuchen

Fix: Schema can try to execute when length is less than 1

Now it does nothing but print a warning.
Future work: create a Valid Range setting for the Schema, maybe with a node.
Joseph Brandenburg vor 7 Monaten
Ursprung
Commit
5fc87cd47d
1 geänderte Dateien mit 3 neuen und 0 gelöschten Zeilen
  1. 3 0
      schema_solve.py

+ 3 - 0
schema_solve.py

@@ -578,6 +578,9 @@ class SchemaSolver:
                     
         
     def solve(self):
+        if self.solve_length < 1:
+            print (f"WARN: Schema {self.signature} has a length of 0 or less and will not expand.")
+            return {} # just don't do anything. This may cause errors if the Schema has dependencies - that's OK.
         for index in range(self.solve_length):
             self.index = index
             frame_mantis_nodes = self.solve_iteration()