More tests, fixed patcher error handler

This commit is contained in:
Anuken
2025-10-25 22:24:32 -04:00
parent 09783898aa
commit 50e2b828f7
3 changed files with 77 additions and 7 deletions

View File

@@ -1,6 +1,7 @@
package mindustry.world.meta;
import arc.struct.*;
import arc.util.*;
import mindustry.*;
public class Attribute{
@@ -47,6 +48,11 @@ public class Attribute{
return map.getThrow(name, () -> new IllegalArgumentException("Unknown Attribute type: " + name));
}
/** May return null. */
public static @Nullable Attribute getOrNull(String name){
return map.get(name);
}
/** @return Whether an attribute exists. */
public static boolean exists(String name){
return map.containsKey(name);