Merge branch 'master' of https://github.com/Anuken/Mindustry into 7.0-features

 Conflicts:
	core/assets/icons/icons.properties
	core/assets/logicids.dat
	core/src/mindustry/ui/dialogs/PlanetDialog.java
	core/src/mindustry/world/blocks/distribution/ItemBridge.java
	core/src/mindustry/world/blocks/liquid/LiquidExtendingBridge.java
	core/src/mindustry/world/blocks/storage/StorageBlock.java
	gradle.properties
This commit is contained in:
Anuken
2021-08-10 15:15:07 -04:00
196 changed files with 2485 additions and 1664 deletions

View File

@@ -244,7 +244,7 @@ public class Generators{
teamr.each((x, y) -> {
int color = teamr.getRaw(x, y);
int index = color == 0xffffffff ? 0 : color == 0xdcc6c6ff ? 1 : color == 0x9d7f7fff ? 2 : -1;
out.setRaw(x, y, index == -1 ? teamr.getRaw(x, y) : team.palette[index].rgba());
out.setRaw(x, y, index == -1 ? teamr.getRaw(x, y) : team.palettei[index]);
});
save(out, block.name + "-team-" + team.name);
@@ -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

View File

@@ -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();

View File

@@ -80,6 +80,7 @@ public class ScriptMainGenerator{
"mindustry.ai.types",
"mindustry.type.weather",
"mindustry.type.weapons",
"mindustry.type.ammo",
"mindustry.game.Objectives",
"mindustry.world.blocks",
"mindustry.world.draw",