Makes the top sprite visible on liquid turret icons (#4683)
* Add top region to liquid turret icons * Attempt to change outline icon generation * Draw regions above the outlined icon over it * Draw regions **above** the outlined icon over it * Add clarrifying comment * Implement backwards compatibility for mods * an -> any
This commit is contained in:
committed by
GitHub
parent
557e5710cd
commit
7a21c02476
@@ -247,7 +247,7 @@ public class Generators{
|
||||
Image last = null;
|
||||
if(block.outlineIcon){
|
||||
int radius = 4;
|
||||
GenRegion region = (GenRegion)regions[regions.length - 1];
|
||||
GenRegion region = (GenRegion)regions[block.outlinedIcon >= 0 ? block.outlinedIcon : regions.length -1];
|
||||
Image base = ImagePacker.get(region);
|
||||
Image out = last = new Image(region.width, region.height);
|
||||
for(int x = 0; x < out.width; x++){
|
||||
@@ -273,6 +273,14 @@ public class Generators{
|
||||
}
|
||||
}
|
||||
|
||||
//do not run for legacy ones
|
||||
if(block.outlinedIcon >= 0){
|
||||
//prevents the regions above from being ignored/invisible/etc
|
||||
for(int i = block.outlinedIcon + 1; i < regions.length; i++){
|
||||
out.draw(ImagePacker.get(regions[i]));
|
||||
}
|
||||
}
|
||||
|
||||
region.path.delete();
|
||||
|
||||
out.save(block.name);
|
||||
|
||||
Reference in New Issue
Block a user