Misc preparations for unified packing
This commit is contained in:
@@ -1290,7 +1290,7 @@ public class Block extends UnlockableContent implements Senseable{
|
||||
}
|
||||
}
|
||||
|
||||
var editorBase = Core.atlas.getPixmap(fullIcon);
|
||||
PixmapRegion editorBase;
|
||||
|
||||
if(gen.length > 1){
|
||||
Pixmap base = Core.atlas.getPixmap(gen[0]).crop();
|
||||
@@ -1304,6 +1304,8 @@ public class Block extends UnlockableContent implements Senseable{
|
||||
packer.add(PageType.main, "block-" + name + "-full", base);
|
||||
|
||||
editorBase = new PixmapRegion(base);
|
||||
}else{
|
||||
editorBase = Core.atlas.getPixmap(gen[0]);
|
||||
}
|
||||
|
||||
packer.add(PageType.editor, name + "-icon-editor", editorBase);
|
||||
|
||||
@@ -41,6 +41,7 @@ public class ConstructBlock extends Block{
|
||||
health = 10;
|
||||
consumesTap = true;
|
||||
solidifes = true;
|
||||
generateIcons = false;
|
||||
inEditor = false;
|
||||
consBlocks[size - 1] = this;
|
||||
sync = true;
|
||||
|
||||
@@ -13,6 +13,7 @@ public class AirBlock extends Floor{
|
||||
hasShadow = false;
|
||||
useColor = false;
|
||||
wall = this;
|
||||
generateIcons = false;
|
||||
needsSurface = false;
|
||||
canShadow = false;
|
||||
}
|
||||
|
||||
@@ -161,8 +161,8 @@ public class Floor extends Block{
|
||||
return;
|
||||
}
|
||||
|
||||
PixmapRegion image = Core.atlas.getPixmap(icons()[0]);
|
||||
PixmapRegion edge = Core.atlas.getPixmap(Core.atlas.find(name + "-edge-stencil", "edge-stencil"));
|
||||
var image = Core.atlas.getPixmap(icons()[0]);
|
||||
var edge = Core.atlas.getPixmap(Core.atlas.find(name + "-edge-stencil", "edge-stencil"));
|
||||
Pixmap result = new Pixmap(edge.width, edge.height);
|
||||
|
||||
for(int x = 0; x < edge.width; x++){
|
||||
|
||||
@@ -8,6 +8,7 @@ public class LegacyBlock extends Block{
|
||||
public LegacyBlock(String name){
|
||||
super(name);
|
||||
inEditor = false;
|
||||
generateIcons = false;
|
||||
}
|
||||
|
||||
/** Removes this block from the world, or replaces it with something else. */
|
||||
|
||||
Reference in New Issue
Block a user