From 0311cfd27586c4680d87a9cac1e3b3f0a610dd55 Mon Sep 17 00:00:00 2001 From: Elixias <61173114+LixieWulf@users.noreply.github.com> Date: Fri, 15 Mar 2024 09:08:23 -0600 Subject: [PATCH] Full icon overrides (#9642) * Something to help with atlas consumption * nightmares --- core/src/mindustry/ctype/UnlockableContent.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/src/mindustry/ctype/UnlockableContent.java b/core/src/mindustry/ctype/UnlockableContent.java index 43190baa9e..434be84c4f 100644 --- a/core/src/mindustry/ctype/UnlockableContent.java +++ b/core/src/mindustry/ctype/UnlockableContent.java @@ -43,6 +43,8 @@ public abstract class UnlockableContent extends MappableContent{ public TextureRegion uiIcon; /** Icon of the full content. Unscaled.*/ public TextureRegion fullIcon; + /** Override for the full icon. Useful for mod content with duplicate icons. Overrides any other full icon.*/ + public String fullOverride = ""; /** The tech tree node for this content, if applicable. Null if not part of a tech tree. */ public @Nullable TechNode techNode; /** Tech nodes for all trees that this content is part of. */ @@ -62,11 +64,12 @@ public abstract class UnlockableContent extends MappableContent{ @Override public void loadIcon(){ fullIcon = + Core.atlas.find(fullOverride, Core.atlas.find(getContentType().name() + "-" + name + "-full", Core.atlas.find(name + "-full", Core.atlas.find(name, Core.atlas.find(getContentType().name() + "-" + name, - Core.atlas.find(name + "1"))))); + Core.atlas.find(name + "1")))))); uiIcon = Core.atlas.find(getContentType().name() + "-" + name + "-ui", fullIcon); }