Misc fixes for mods

This commit is contained in:
Anuken
2022-05-13 22:23:50 -04:00
parent ad5e4f2556
commit b66283fbd0
3 changed files with 14 additions and 10 deletions

View File

@@ -1269,12 +1269,13 @@ public class Block extends UnlockableContent implements Senseable{
var gen = icons();
if(outlineIcon){
PixmapRegion region = Core.atlas.getPixmap(gen[outlinedIcon >= 0 ? Math.min(outlinedIcon, gen.length - 1) : gen.length -1]);
AtlasRegion atlasRegion = (AtlasRegion)gen[outlinedIcon >= 0 ? Math.min(outlinedIcon, gen.length - 1) : gen.length -1];
PixmapRegion region = Core.atlas.getPixmap(atlasRegion);
Pixmap out = last = Pixmaps.outline(region, outlineColor, outlineRadius);
if(Core.settings.getBool("linear", true)){
Pixmaps.bleed(out);
}
packer.add(PageType.main, name, out);
packer.add(PageType.main, atlasRegion.name, out);
}
var toOutline = new Seq<TextureRegion>();

View File

@@ -37,7 +37,7 @@ public class DrawTurret extends DrawBlock{
part.getOutlines(out);
}
if(block.region.found() && !Core.atlas.has(block.name + "-preview")){
if(block.region.found()){
out.add(block.region);
}
}