From b03fe2c86c83abf8806961e20967abe10e3b2835 Mon Sep 17 00:00:00 2001 From: Anuken Date: Tue, 26 Apr 2022 12:03:18 -0400 Subject: [PATCH] Skip overriding non-existent sprites --- core/src/mindustry/mod/Mods.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/src/mindustry/mod/Mods.java b/core/src/mindustry/mod/Mods.java index e0c778a594..12428967b5 100644 --- a/core/src/mindustry/mod/Mods.java +++ b/core/src/mindustry/mod/Mods.java @@ -185,6 +185,11 @@ public class Mods implements Loadable{ for(Fi file : sprites){ String name = file.nameWithoutExtension(); + if(!prefix && !Core.atlas.has(name)){ + Log.warn("Sprite '@' in mod '@' attempts to override a non-existent sprite. Ignoring.", name, mod.name); + continue; + } + //TODO !!! document this on the wiki !!! //do not allow packing standard outline sprites for now, they are no longer necessary and waste space! //TODO also full regions are bad: || name.endsWith("-full")