Unverified Commit 45c08c58 authored by Melledy's avatar Melledy
Browse files

Clean up OpenStateData onLoad logic

parent 4a675cc8
...@@ -42,16 +42,13 @@ public class OpenStateData extends GameResource { ...@@ -42,16 +42,13 @@ public class OpenStateData extends GameResource {
// Add this open state to the global list. // Add this open state to the global list.
GameData.getOpenStateList().add(this); GameData.getOpenStateList().add(this);
// Clean up cond. // Remove any empty conditions
List<OpenStateCond> cleanedConds = new ArrayList<>(); if (this.cond != null) {
for (var c : this.cond) { this.cond.removeIf(c -> c.getCondType() == null);
if (c.getCondType() != null) { } else {
cleanedConds.add(c); this.cond = new ArrayList<>();
} }
} }
this.cond = cleanedConds;
}
} }
/* Open state names for documentation: /* Open state names for documentation:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment