Added auto-generated cliffs for floor blocks

This commit is contained in:
Anuken 2018-07-20 16:06:26 -04:00
parent 48c7daa4ab
commit 06b9d328f4
19 changed files with 750 additions and 497 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 176 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 169 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 149 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 155 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 162 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 175 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 149 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 157 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 163 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 169 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 149 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 155 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 162 B

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 135 KiB

After

Width:  |  Height:  |  Size: 137 KiB

View File

@ -8,8 +8,10 @@ import io.anuke.mindustry.type.Liquid;
import io.anuke.mindustry.type.Mech;
import io.anuke.mindustry.type.Upgrade;
import io.anuke.mindustry.world.Block;
import io.anuke.mindustry.world.blocks.Floor;
import io.anuke.mindustry.world.blocks.OreBlock;
import io.anuke.mindustry.world.blocks.defense.turrets.Turret;
import io.anuke.ucore.graphics.Draw;
import io.anuke.ucore.graphics.Hue;
public class Generators {
@ -146,6 +148,33 @@ public class Generators {
}
});
context.generate("block-edges", () -> {
for(Block block : Block.all()){
if(!(block instanceof Floor)) continue;
Floor floor = (Floor)block;
if(floor.getIcon().length > 0 && !Draw.hasRegion(floor.name + "-cliff-side")){
Image floori = context.get(floor.getIcon()[0]);
Color color = floori.getColor(0, 0).mul(1.3f, 1.3f, 1.3f, 1f);
String[] names = {"cliff-edge-2", "cliff-edge", "cliff-edge-1", "cliff-side"};
for(String str : names){
Image image = context.get("generic-" + str);
for(int x = 0; x < image.width(); x++){
for(int y = 0; y < image.height(); y++){
Color other = image.getColor(x, y);
if(other.a > 0){
image.draw(x, y, color);
}
}
}
image.save(floor.name + "-" + str);
}
}
}
});
context.generate("ore-icons", () -> {
for(Block block : Block.all()){
if(!(block instanceof OreBlock)) continue;