diff --git a/core/assets/maps/canyon.png b/core/assets/maps/canyon.png index b46ec157f1..3b9d43316c 100644 Binary files a/core/assets/maps/canyon.png and b/core/assets/maps/canyon.png differ diff --git a/core/assets/maps/delta.png b/core/assets/maps/delta.png index a1dde73f17..ef5a6eafbd 100644 Binary files a/core/assets/maps/delta.png and b/core/assets/maps/delta.png differ diff --git a/core/assets/maps/maze.png b/core/assets/maps/maze.png index eda20911bd..82684d1761 100644 Binary files a/core/assets/maps/maze.png and b/core/assets/maps/maze.png differ diff --git a/core/assets/maps/pit.png b/core/assets/maps/pit.png index fb4db8e271..58cc2fcc29 100644 Binary files a/core/assets/maps/pit.png and b/core/assets/maps/pit.png differ diff --git a/core/assets/ui/out/icon-defense.png b/core/assets/ui/out/icon-defense.png index d879ca6c44..003074bc56 100644 Binary files a/core/assets/ui/out/icon-defense.png and b/core/assets/ui/out/icon-defense.png differ diff --git a/core/assets/ui/uiskin.png b/core/assets/ui/uiskin.png index 150b81fb3b..dd65603f7f 100644 Binary files a/core/assets/ui/uiskin.png and b/core/assets/ui/uiskin.png differ diff --git a/core/src/io/anuke/mindustry/EffectLoader.java b/core/src/io/anuke/mindustry/EffectLoader.java index 55519fe7f6..3317c25dea 100644 --- a/core/src/io/anuke/mindustry/EffectLoader.java +++ b/core/src/io/anuke/mindustry/EffectLoader.java @@ -83,6 +83,13 @@ public class EffectLoader{ Draw.reset(); }); + Effect.create("smoke", 100, e -> { + Draw.color(Color.GRAY, new Color(0.3f, 0.3f, 0.3f, 1f), e.ifract()); + float size = 7f-e.ifract()*7f; + Draw.rect("circle", e.x, e.y, size, size); + Draw.reset(); + }); + Effect.create("spawn", 23, e -> { Draw.thickness(2f); Draw.color(Hue.mix(Color.DARK_GRAY, Color.SCARLET, e.ifract())); diff --git a/core/src/io/anuke/mindustry/ai/PassTileGraph.java b/core/src/io/anuke/mindustry/ai/PassTileGraph.java index 61a998b840..1c675c757d 100644 --- a/core/src/io/anuke/mindustry/ai/PassTileGraph.java +++ b/core/src/io/anuke/mindustry/ai/PassTileGraph.java @@ -15,11 +15,11 @@ public class PassTileGraph implements IndexedGraph{ public Array> getConnections(Tile fromNode){ tempConnections.clear(); - if(fromNode.block().solid && !fromNode.block().update) + if(!fromNode.passable()) return tempConnections; for(Tile tile : fromNode.getNearby()){ - if(tile != null && (!tile.block().solid || tile.block().update)) + if(tile != null && (tile.passable())) tempConnections.add(new TileConnection(fromNode, tile)); } diff --git a/core/src/io/anuke/mindustry/entities/TileEntity.java b/core/src/io/anuke/mindustry/entities/TileEntity.java index d898116c10..71a8a56c82 100644 --- a/core/src/io/anuke/mindustry/entities/TileEntity.java +++ b/core/src/io/anuke/mindustry/entities/TileEntity.java @@ -9,6 +9,7 @@ import io.anuke.mindustry.world.blocks.Blocks; import io.anuke.mindustry.world.blocks.ProductionBlocks; import io.anuke.ucore.core.Effects; import io.anuke.ucore.entities.Entity; +import io.anuke.ucore.util.Mathf; public class TileEntity extends Entity{ public Tile tile; @@ -54,6 +55,12 @@ public class TileEntity extends Entity{ @Override public void update(){ + if(health != 0 && !tile.block().name().contains("block") && + Mathf.chance(0.009f*delta*(1f-(float)health/maxhealth))){ + + Effects.effect("smoke", x+Mathf.range(4), y+Mathf.range(4)); + } + tile.block().update(tile); } diff --git a/core/src/io/anuke/mindustry/ui/LevelDialog.java b/core/src/io/anuke/mindustry/ui/LevelDialog.java index e88b7bb6b4..14993c0a88 100644 --- a/core/src/io/anuke/mindustry/ui/LevelDialog.java +++ b/core/src/io/anuke/mindustry/ui/LevelDialog.java @@ -46,7 +46,7 @@ public class LevelDialog extends Dialog{ image.clicked(()->{ selectedMap = index; }); - image.getImageCell().size(150, 150); + image.getImageCell().size(164); content().add(image).size(180); } diff --git a/core/src/io/anuke/mindustry/world/Generator.java b/core/src/io/anuke/mindustry/world/Generator.java index 5f23cf9a24..17d758659e 100644 --- a/core/src/io/anuke/mindustry/world/Generator.java +++ b/core/src/io/anuke/mindustry/world/Generator.java @@ -24,6 +24,7 @@ public class Generator{ Hue.rgb(80, 110, 180), Blocks.water, Hue.rgb(70, 90, 150), Blocks.deepwater, Hue.rgb(110, 80, 30), Blocks.dirt, + Hue.rgb(160, 120, 70), Blocks.dirtblock, Hue.rgb(100, 100, 100), Blocks.stoneblock ); @@ -50,6 +51,7 @@ public class Generator{ core = tiles[x][y]; }else if(color == spawn){ spawnpoints.add(tiles[x][y]); + floor = Blocks.dirt; }else{ if(Mathf.chance(0.02)){ block = Mathf.choose(Blocks.rock, Blocks.rock2); diff --git a/core/src/io/anuke/mindustry/world/Tile.java b/core/src/io/anuke/mindustry/world/Tile.java index 8a48f8c95b..666377b308 100644 --- a/core/src/io/anuke/mindustry/world/Tile.java +++ b/core/src/io/anuke/mindustry/world/Tile.java @@ -64,6 +64,14 @@ public class Tile{ this.floor = type; } + public boolean passable(){ + return !(floor.solid || (block.solid && !block.update)); + } + + public boolean solid(){ + return block.solid || floor.solid; + } + public boolean breakable(){ return block.update || block.breakable; }