From 78317e61268f14d516957af7d36829312880f82e Mon Sep 17 00:00:00 2001 From: Anuken Date: Thu, 18 Feb 2021 20:15:46 -0500 Subject: [PATCH] Uncap content names in resolution --- core/src/mindustry/mod/ContentParser.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/src/mindustry/mod/ContentParser.java b/core/src/mindustry/mod/ContentParser.java index 6467bd7813..3e5ca141e2 100644 --- a/core/src/mindustry/mod/ContentParser.java +++ b/core/src/mindustry/mod/ContentParser.java @@ -704,10 +704,9 @@ public class ContentParser{ Class resolve(String base, Class def){ //no base class specified if(base.isEmpty() && def != null) return def; - if(!base.isEmpty() && Character.isLowerCase(base.charAt(0))) base = Strings.capitalize(base); //return mapped class if found in the global map - var out = ClassMap.classes.get(base); + var out = ClassMap.classes.get(!base.isEmpty() && Character.isLowerCase(base.charAt(0)) ? Strings.capitalize(base) : base); if(out != null) return (Class)out; //try to resolve it as a raw class name if it's allowed