diff --git a/core/assets/version.properties b/core/assets/version.properties index d62f17fc2b..8fb8eb020f 100644 --- a/core/assets/version.properties +++ b/core/assets/version.properties @@ -1,7 +1,7 @@ #Autogenerated file. Do not modify. -#Sat Mar 03 12:04:38 EST 2018 +#Sat Mar 03 18:05:41 EST 2018 version=release -androidBuildCode=333 +androidBuildCode=335 name=Mindustry code=3.4 -build=30 +build=custom build diff --git a/core/src/io/anuke/mindustry/core/NetClient.java b/core/src/io/anuke/mindustry/core/NetClient.java index b030f5eaf3..6ef6e35a14 100644 --- a/core/src/io/anuke/mindustry/core/NetClient.java +++ b/core/src/io/anuke/mindustry/core/NetClient.java @@ -164,7 +164,7 @@ public class NetClient extends Module { }); Net.handleClient(PlacePacket.class, (packet) -> { - Placement.placeBlock(packet.x, packet.y, Block.getByID(packet.block), packet.rotation, true, false); + Placement.placeBlock(packet.x, packet.y, Block.getByID(packet.block), packet.rotation, true, Timers.get("placeblocksound", 10)); if(packet.playerid == player.id){ Tile tile = world.tile(packet.x, packet.y); @@ -173,7 +173,7 @@ public class NetClient extends Module { }); Net.handleClient(BreakPacket.class, (packet) -> { - Placement.breakBlock(packet.x, packet.y, true, false); + Placement.breakBlock(packet.x, packet.y, true, Timers.get("breakblocksound", 10)); }); Net.handleClient(EntitySpawnPacket.class, packet -> { @@ -262,11 +262,7 @@ public class NetClient extends Module { next.block().handleItem(Item.getByID(packet.itemid), next, tile); }; - if(threads.isEnabled()){ - threads.run(r); - }else{ - r.run(); - } + threads.run(r); }); Net.handleClient(ItemSetPacket.class, packet -> { @@ -276,11 +272,7 @@ public class NetClient extends Module { tile.entity.items[packet.itemid] = packet.amount; }; - if(threads.isEnabled()){ - threads.run(r); - }else{ - r.run(); - } + threads.run(r); }); Net.handleClient(ItemOffloadPacket.class, packet -> { @@ -291,11 +283,7 @@ public class NetClient extends Module { next.block().handleItem(Item.getByID(packet.itemid), next, tile); }; - if(threads.isEnabled()){ - threads.run(r); - }else{ - r.run(); - } + threads.run(r); }); Net.handleClient(NetErrorPacket.class, packet -> { @@ -375,4 +363,4 @@ public class NetClient extends Module { Net.updatePing(); } } -} +} \ No newline at end of file diff --git a/core/src/io/anuke/mindustry/world/Tile.java b/core/src/io/anuke/mindustry/world/Tile.java index 9d65fde7df..4d63045707 100644 --- a/core/src/io/anuke/mindustry/world/Tile.java +++ b/core/src/io/anuke/mindustry/world/Tile.java @@ -231,6 +231,11 @@ public class Tile{ return world.tile(x + relative.x, y + relative.y); } + public Tile target(){ + Tile link = getLinked(); + return link == null ? this : link; + } + public Tile getNearby(int rotation){ if(rotation == 0) return world.tile(x + 1, y); if(rotation == 1) return world.tile(x, y + 1);