Fixed #8667
This commit is contained in:
@@ -195,10 +195,12 @@ public class Mods implements Loadable{
|
||||
float textureScale = mod.meta.texturescale;
|
||||
|
||||
for(Fi file : sprites){
|
||||
String name = file.nameWithoutExtension();
|
||||
String
|
||||
baseName = file.nameWithoutExtension(),
|
||||
regionName = baseName.contains(".") ? baseName.substring(0, baseName.indexOf(".")) : baseName;
|
||||
|
||||
if(!prefix && !Core.atlas.has(name)){
|
||||
Log.warn("Sprite '@' in mod '@' attempts to override a non-existent sprite. Ignoring.", name, mod.name);
|
||||
if(!prefix && !Core.atlas.has(regionName)){
|
||||
Log.warn("Sprite '@' in mod '@' attempts to override a non-existent sprite. Ignoring.", regionName, mod.name);
|
||||
continue;
|
||||
|
||||
//(horrible code below)
|
||||
@@ -215,7 +217,7 @@ public class Mods implements Loadable{
|
||||
}
|
||||
//this returns a *runnable* which actually packs the resulting pixmap; this has to be done synchronously outside the method
|
||||
return () -> {
|
||||
String fullName = (prefix ? mod.name + "-" : "") + name;
|
||||
String fullName = (prefix ? mod.name + "-" : "") + baseName;
|
||||
packer.add(getPage(file), fullName, new PixmapRegion(pix));
|
||||
if(textureScale != 1.0f){
|
||||
textureResize.put(fullName, textureScale);
|
||||
|
||||
Reference in New Issue
Block a user