From 3b179315c1f457c22085c8cdd445a574dbc37a1a Mon Sep 17 00:00:00 2001 From: Anuken Date: Fri, 20 Feb 2026 15:58:03 -0500 Subject: [PATCH] Better attribute parsing error message --- core/src/mindustry/mod/ContentParser.java | 3 +++ gradle.properties | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/core/src/mindustry/mod/ContentParser.java b/core/src/mindustry/mod/ContentParser.java index 5d799e3f2d..9381cba844 100644 --- a/core/src/mindustry/mod/ContentParser.java +++ b/core/src/mindustry/mod/ContentParser.java @@ -91,6 +91,9 @@ public class ContentParser{ return Attribute.add(attr); }); put(Attributes.class, (type, data) -> { + if(!data.isObject()){ + throw new IllegalArgumentException("Attribute definitions must be objects, e.g. {heat: 10}"); + } Attributes attr = new Attributes(); for(var child : data){ Attribute value = Attribute.exists(child.name) ? Attribute.get(child.name) : Attribute.add(child.name); diff --git a/gradle.properties b/gradle.properties index 385b7cd9b7..d4d3e6cbdf 100644 --- a/gradle.properties +++ b/gradle.properties @@ -26,4 +26,4 @@ org.gradle.caching=true org.gradle.internal.http.socketTimeout=100000 org.gradle.internal.http.connectionTimeout=100000 android.enableR8.fullMode=false -archash=b6926f1d27 +archash=9045acbeb2