mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-01-24 13:31:45 -08:00
Cleanup
This commit is contained in:
parent
08f8323465
commit
fa62336096
7 changed files with 3331 additions and 3873 deletions
Binary file not shown.
|
Before Width: | Height: | Size: 328 B |
Binary file not shown.
|
Before Width: | Height: | Size: 304 B |
File diff suppressed because it is too large
Load diff
Binary file not shown.
|
Before Width: | Height: | Size: 762 KiB After Width: | Height: | Size: 715 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 128 KiB After Width: | Height: | Size: 125 KiB |
|
|
@ -1,5 +1,6 @@
|
|||
package mindustry.tools;
|
||||
|
||||
import arc.*;
|
||||
import arc.files.*;
|
||||
import arc.graphics.*;
|
||||
import arc.graphics.g2d.*;
|
||||
|
|
@ -134,7 +135,9 @@ public class Generators{
|
|||
}
|
||||
}
|
||||
|
||||
image.save("block-" + block.name + "-full");
|
||||
if(!(regions.length == 1 && regions[0] == Core.atlas.find(block.name))){
|
||||
image.save("block-" + block.name + "-full");
|
||||
}
|
||||
|
||||
image.save("../editor/" + block.name + "-icon-editor");
|
||||
|
||||
|
|
@ -211,7 +214,7 @@ public class Generators{
|
|||
});
|
||||
|
||||
ImagePacker.generate("unit-icons", () -> {
|
||||
content.units().each(type -> !type.flying, type -> {
|
||||
content.units().each(type -> {
|
||||
type.load();
|
||||
|
||||
Image image = ImagePacker.get(type.region);
|
||||
|
|
@ -223,6 +226,12 @@ public class Generators{
|
|||
}
|
||||
image.draw(type.region);
|
||||
|
||||
Image baseCell = ImagePacker.get(type.cellRegion);
|
||||
Image cell = new Image(type.cellRegion.getWidth(), type.cellRegion.getHeight());
|
||||
cell.each((x, y) -> cell.draw(x, y, baseCell.getColor(x, y).mul(Color.gray)));
|
||||
|
||||
image.draw(cell, image.width/2 - cell.width/2, image.height/2 - cell.height/2);
|
||||
|
||||
for(Weapon weapon : type.weapons){
|
||||
weapon.load();
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package mindustry.tools;
|
||||
|
||||
import arc.func.*;
|
||||
import arc.graphics.Color;
|
||||
import arc.graphics.g2d.TextureRegion;
|
||||
import arc.util.Structs;
|
||||
|
|
@ -54,6 +55,14 @@ class Image{
|
|||
return color;
|
||||
}
|
||||
|
||||
void each(Intc2 cons){
|
||||
for(int x = 0; x < width; x++){
|
||||
for(int y = 0; y < height; y++){
|
||||
cons.get(x, y);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void draw(int x, int y, Color color){
|
||||
graphics.setColor(new java.awt.Color(color.r, color.g, color.b, color.a));
|
||||
graphics.fillRect(x, y, 1, 1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue