WIP team icons
This commit is contained in:
@@ -390,6 +390,19 @@ public class Generators{
|
||||
}
|
||||
});
|
||||
|
||||
generate("team-icons", () -> {
|
||||
for(Team team : Team.all){
|
||||
if(has("team-" + team.name)){
|
||||
int rgba = team == Team.derelict ? Color.valueOf("b7b8c9").rgba() : team.color.rgba();
|
||||
Pixmap base = get("team-" + team.name);
|
||||
base.each((x, y) -> base.setRaw(x, y, Color.muli(base.getRaw(x, y), rgba)));
|
||||
|
||||
delete("team-" + team.name);
|
||||
save(base.outline(Pal.gray, 3), "../ui/team-" + team.name);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
generate("unit-icons", () -> content.units().each(type -> {
|
||||
if(type.isHidden()) return; //hidden units don't generate
|
||||
|
||||
|
||||
@@ -236,6 +236,10 @@ public class ImagePacker{
|
||||
base.draw(image, 0, 0, image.width, image.height, base.width/2 - wx/2, base.height/2 - wy/2, wx, wy, true, true);
|
||||
}
|
||||
|
||||
static void delete(String name){
|
||||
((GenRegion)Core.atlas.find(name)).path.delete();
|
||||
}
|
||||
|
||||
static void replace(String name, Pixmap image){
|
||||
Fi.get(name + ".png").writePng(image);
|
||||
((GenRegion)Core.atlas.find(name)).path.delete();
|
||||
|
||||
Reference in New Issue
Block a user