From b816bc1467c9b35d4b2eb87b1cc0aeeaf1a817ad Mon Sep 17 00:00:00 2001 From: Somka000 <51973243+Somka000@users.noreply.github.com> Date: Wed, 16 Sep 2020 08:20:58 +0200 Subject: [PATCH 1/3] Update servers_v6.json Move .pl to 6.0 server list --- servers_v6.json | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/servers_v6.json b/servers_v6.json index fe51488c70..4f8f85f51e 100644 --- a/servers_v6.json +++ b/servers_v6.json @@ -1 +1,8 @@ -[] +[ + { + "address": "mindustry.pl:6000" + }, + { + "address": "mindustry.pl:6666" + } +] From 542492e434fe85bb3c2845bbdf1f007d0e96cb15 Mon Sep 17 00:00:00 2001 From: Somka000 <51973243+Somka000@users.noreply.github.com> Date: Wed, 16 Sep 2020 08:38:48 +0200 Subject: [PATCH 2/3] Update servers_be.json Move .pl to 6.0 server list --- servers_be.json | 6 ------ 1 file changed, 6 deletions(-) diff --git a/servers_be.json b/servers_be.json index 047dfba7e0..c8bdffd609 100644 --- a/servers_be.json +++ b/servers_be.json @@ -5,13 +5,7 @@ { "address": "nydustry.nydus.app:6060" }, - { - "address": "mindustry.pl:6000" - }, { "address": "routerchain.ddns.net" - }, - { - "address": "mindustry.pl:6666" } ] From e2a838a7152f615a0db66de29d587f4d58995fb2 Mon Sep 17 00:00:00 2001 From: Anuken Date: Wed, 16 Sep 2020 09:23:57 -0400 Subject: [PATCH 3/3] Fixed #2563 --- core/src/mindustry/core/NetServer.java | 52 +++++++++---------- .../src/mindustry/graphics/FloorRenderer.java | 2 +- .../mindustry/maps/filters/FilterOption.java | 12 ++--- 3 files changed, 33 insertions(+), 33 deletions(-) diff --git a/core/src/mindustry/core/NetServer.java b/core/src/mindustry/core/NetServer.java index 6174798e96..7ca78f8c89 100644 --- a/core/src/mindustry/core/NetServer.java +++ b/core/src/mindustry/core/NetServer.java @@ -593,38 +593,38 @@ public class NetServer implements ApplicationListener{ if(player.isBuilder()){ player.builder().clearBuilding(); player.builder().updateBuilding(building); + + if(requests != null){ + for(BuildPlan req : requests){ + if(req == null) continue; + Tile tile = world.tile(req.x, req.y); + if(tile == null || (!req.breaking && req.block == null)) continue; + //auto-skip done requests + if(req.breaking && tile.block() == Blocks.air){ + continue; + }else if(!req.breaking && tile.block() == req.block && (!req.block.rotate || (tile.build != null && tile.build.rotation == req.rotation))){ + continue; + }else if(con.rejectedRequests.contains(r -> r.breaking == req.breaking && r.x == req.x && r.y == req.y)){ //check if request was recently rejected, and skip it if so + continue; + }else if(!netServer.admins.allowAction(player, req.breaking ? ActionType.breakBlock : ActionType.placeBlock, tile, action -> { //make sure request is allowed by the server + action.block = req.block; + action.rotation = req.rotation; + action.config = req.config; + })){ + //force the player to remove this request if that's not the case + Call.removeQueueBlock(player.con, req.x, req.y, req.breaking); + con.rejectedRequests.add(req); + continue; + } + player.builder().plans().addLast(req); + } + } } if(player.isMiner()){ player.miner().mineTile(mining); } - if(requests != null){ - for(BuildPlan req : requests){ - if(req == null) continue; - Tile tile = world.tile(req.x, req.y); - if(tile == null || (!req.breaking && req.block == null)) continue; - //auto-skip done requests - if(req.breaking && tile.block() == Blocks.air){ - continue; - }else if(!req.breaking && tile.block() == req.block && (!req.block.rotate || (tile.build != null && tile.build.rotation == req.rotation))){ - continue; - }else if(con.rejectedRequests.contains(r -> r.breaking == req.breaking && r.x == req.x && r.y == req.y)){ //check if request was recently rejected, and skip it if so - continue; - }else if(!netServer.admins.allowAction(player, req.breaking ? ActionType.breakBlock : ActionType.placeBlock, tile, action -> { //make sure request is allowed by the server - action.block = req.block; - action.rotation = req.rotation; - action.config = req.config; - })){ - //force the player to remove this request if that's not the case - Call.removeQueueBlock(player.con, req.x, req.y, req.breaking); - con.rejectedRequests.add(req); - continue; - } - player.builder().plans().addLast(req); - } - } - con.rejectedRequests.clear(); if(!player.dead()){ diff --git a/core/src/mindustry/graphics/FloorRenderer.java b/core/src/mindustry/graphics/FloorRenderer.java index 268c4a9a88..26816b08d0 100644 --- a/core/src/mindustry/graphics/FloorRenderer.java +++ b/core/src/mindustry/graphics/FloorRenderer.java @@ -228,7 +228,7 @@ public class FloorRenderer implements Disposable{ int chunksx = Mathf.ceil((float)(world.width()) / chunksize), chunksy = Mathf.ceil((float)(world.height()) / chunksize); cache = new Chunk[chunksx][chunksy]; - cbatch = new MultiCacheBatch(chunksize * chunksize * 6); + cbatch = new MultiCacheBatch(chunksize * chunksize * 7); Time.mark(); diff --git a/core/src/mindustry/maps/filters/FilterOption.java b/core/src/mindustry/maps/filters/FilterOption.java index 1124c195b8..dedebfe713 100644 --- a/core/src/mindustry/maps/filters/FilterOption.java +++ b/core/src/mindustry/maps/filters/FilterOption.java @@ -17,13 +17,13 @@ import mindustry.world.blocks.environment.*; import static mindustry.Vars.*; public abstract class FilterOption{ - public static final Boolf floorsOnly = b -> (b instanceof Floor && !(b instanceof OverlayFloor)) && !headless && Core.atlas.isFound(b.icon(mindustry.ui.Cicon.full)); - public static final Boolf wallsOnly = b -> (!b.synthetic() && !(b instanceof Floor)) && !headless && Core.atlas.isFound(b.icon(mindustry.ui.Cicon.full)); - public static final Boolf floorsOptional = b -> b == Blocks.air || ((b instanceof Floor && !(b instanceof OverlayFloor)) && !headless && Core.atlas.isFound(b.icon(mindustry.ui.Cicon.full))); - public static final Boolf wallsOptional = b -> b == Blocks.air || ((!b.synthetic() && !(b instanceof Floor)) && !headless && Core.atlas.isFound(b.icon(mindustry.ui.Cicon.full))); - public static final Boolf wallsOresOptional = b -> b == Blocks.air || (((!b.synthetic() && !(b instanceof Floor)) || (b instanceof OverlayFloor)) && !headless && Core.atlas.isFound(b.icon(mindustry.ui.Cicon.full))); + public static final Boolf floorsOnly = b -> (b instanceof Floor && !(b instanceof OverlayFloor)) && !headless && Core.atlas.isFound(b.icon(Cicon.full)); + public static final Boolf wallsOnly = b -> (!b.synthetic() && !(b instanceof Floor)) && !headless && Core.atlas.isFound(b.icon(Cicon.full)) && b.inEditor; + public static final Boolf floorsOptional = b -> b == Blocks.air || ((b instanceof Floor && !(b instanceof OverlayFloor)) && !headless && Core.atlas.isFound(b.icon(Cicon.full))); + public static final Boolf wallsOptional = b -> b == Blocks.air || ((!b.synthetic() && !(b instanceof Floor)) && !headless && Core.atlas.isFound(b.icon(Cicon.full))); + public static final Boolf wallsOresOptional = b -> b == Blocks.air || (((!b.synthetic() && !(b instanceof Floor)) || (b instanceof OverlayFloor)) && !headless && Core.atlas.isFound(b.icon(Cicon.full))) && b.inEditor; public static final Boolf oresOnly = b -> b instanceof OverlayFloor && !headless && Core.atlas.isFound(b.icon(mindustry.ui.Cicon.full)); - public static final Boolf anyOptional = b -> floorsOnly.get(b) || wallsOnly.get(b) || oresOnly.get(b) || b == Blocks.air; + public static final Boolf anyOptional = b -> (floorsOnly.get(b) || wallsOnly.get(b) || oresOnly.get(b) || b == Blocks.air) && b.inEditor; public abstract void build(Table table);