From 19cd6fd07cc5b8caea7a4335c6acd95cdf8f7ea8 Mon Sep 17 00:00:00 2001 From: Anuken Date: Wed, 24 May 2023 09:49:30 -0400 Subject: [PATCH] Fixed #8632 --- core/assets/bundles/bundle.properties | 4 ++-- core/src/mindustry/net/ArcNetProvider.java | 3 +-- tools/src/mindustry/tools/Generators.java | 8 +++++++- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/core/assets/bundles/bundle.properties b/core/assets/bundles/bundle.properties index 1b327a02cd..c7f7921ae2 100644 --- a/core/assets/bundles/bundle.properties +++ b/core/assets/bundles/bundle.properties @@ -1811,8 +1811,8 @@ hint.factoryControl.mobile = To set a unit factory's [accent]output destination[ gz.mine = Move near the \uF8C4 [accent]copper ore[] on the ground and click to begin mining. gz.mine.mobile = Move near the \uF8C4 [accent]copper ore[] on the ground and tap it to begin mining. -gz.research = Open the \uE875 tech tree.\nResearch the \uF870 [accent]Mechanical Drill[], then select it from the menu in the bottom right.\nClick on a copper patch to place it. -gz.research.mobile = Open the \uE875 tech tree.\nResearch the \uF870 [accent]Mechanical Drill[], then select it from the menu in the bottom right.\nTap on a copper patch to place it.\n\nPress the \uE800 [accent]checkmark[] at the bottom right to confirm. +gz.research = Open the \uE875 tech tree.\nResearch the \uF870 [accent]Mechanical Drill[], then select it from the \ue85e menu in the bottom right.\nClick on a copper patch to place it. +gz.research.mobile = Open the \uE875 tech tree.\nResearch the \uF870 [accent]Mechanical Drill[], then select it from the \ue85e menu in the bottom right.\nTap on a copper patch to place it.\n\nPress the \uE800 [accent]checkmark[] at the bottom right to confirm. gz.conveyors = Research and place \uF896 [accent]conveyors[] to move the mined resources\nfrom drills to the core.\n\nClick and drag to place multiple conveyors.\n[accent]Scroll[] to rotate. gz.conveyors.mobile = Research and place \uF896 [accent]conveyors[] to move the mined resources\nfrom drills to the core.\n\nHold down your finger for a second and drag to place multiple conveyors. gz.drills = Expand the mining operation.\nPlace more Mechanical Drills.\nMine 100 copper. diff --git a/core/src/mindustry/net/ArcNetProvider.java b/core/src/mindustry/net/ArcNetProvider.java index 462415b20d..222a97baa0 100644 --- a/core/src/mindustry/net/ArcNetProvider.java +++ b/core/src/mindustry/net/ArcNetProvider.java @@ -136,8 +136,7 @@ public class ArcNetProvider implements NetProvider{ @Override public void received(Connection connection, Object object){ - if(!(connection.getArbitraryData() instanceof ArcConnection k)) return; - if(!(object instanceof Packet pack)) return; + if(!(connection.getArbitraryData() instanceof ArcConnection k) || !(object instanceof Packet pack)) return; if(packetSpamLimit > 0 && !k.packetRate.allow(3000, packetSpamLimit)){ Log.warn("Blacklisting IP '@' as potential DOS attack - packet spam.", k.address); diff --git a/tools/src/mindustry/tools/Generators.java b/tools/src/mindustry/tools/Generators.java index a48462ebbd..fa954a4197 100644 --- a/tools/src/mindustry/tools/Generators.java +++ b/tools/src/mindustry/tools/Generators.java @@ -349,7 +349,13 @@ public class Generators{ region.path.delete(); - save(out, region.name); + //1 pixel of padding to prevent edges with linear filtering + int padding = 1; + Pixmap padded = new Pixmap(base.width + padding*2, base.height + padding*2); + padded.draw(base, padding, padding); + padded = padded.outline(block.outlineColor, block.outlineRadius); + + save(padded, region.name); } if(!regions[0].found()){