From e729033b0d3d27c80e044a58117a642a8ca435ff Mon Sep 17 00:00:00 2001 From: way-zer Date: Sat, 21 Dec 2024 13:02:16 +0800 Subject: [PATCH] =?UTF-8?q?remove=20patch=2068:=20=E5=89=AF=E4=BD=9C?= =?UTF-8?q?=E7=94=A8=E8=BF=87=E5=A4=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- patches/client/0029-H-misc.patch | 16 ++++++++- patches/client/0059-FC-reliableSync.patch | 2 +- ...ch => 0068-HC-placeShiftReplacement.patch} | 0 .../0068-OC-limit-pingExecutor-Ping.patch | 36 ------------------- ...ch => 0069-FC-extend-WaveInfoDialog.patch} | 0 ...0-FC-paste-logicCode-from-schematic.patch} | 0 6 files changed, 16 insertions(+), 38 deletions(-) rename patches/client/{0069-HC-placeShiftReplacement.patch => 0068-HC-placeShiftReplacement.patch} (100%) delete mode 100644 patches/client/0068-OC-limit-pingExecutor-Ping.patch rename patches/client/{0070-FC-extend-WaveInfoDialog.patch => 0069-FC-extend-WaveInfoDialog.patch} (100%) rename patches/client/{0071-FC-paste-logicCode-from-schematic.patch => 0070-FC-paste-logicCode-from-schematic.patch} (100%) diff --git a/patches/client/0029-H-misc.patch b/patches/client/0029-H-misc.patch index 47565726b0df..6bb0c9f3f7e1 100644 --- a/patches/client/0029-H-misc.patch +++ b/patches/client/0029-H-misc.patch @@ -16,6 +16,7 @@ Content-Transfer-Encoding: 8bit core/src/mindustry/core/UI.java | 20 ++----------------- core/src/mindustry/game/Schematics.java | 8 +++++--- .../mindustry/graphics/MinimapRenderer.java | 6 ++++-- + core/src/mindustry/net/Net.java | 2 +- core/src/mindustry/ui/dialogs/JoinDialog.java | 19 ++++++++++-------- .../mindustry/ui/dialogs/KeybindDialog.java | 9 ++++++--- .../ui/fragments/BlockInventoryFragment.java | 2 +- @@ -24,7 +25,7 @@ Content-Transfer-Encoding: 8bit .../world/blocks/distribution/Router.java | 3 ++- .../world/blocks/production/BeamDrill.java | 12 ++++------- .../mindustry/desktop/DesktopLauncher.java | 12 ++++++++++- - 16 files changed, 79 insertions(+), 49 deletions(-) + 17 files changed, 80 insertions(+), 50 deletions(-) diff --git a/core/src/mindustry/ClientLauncher.java b/core/src/mindustry/ClientLauncher.java index 87c1dfce278bdc123ee761d8e1e16c2b883d2c8a..bb7e299b171161d1416d27e724a40968961725f9 100644 @@ -222,6 +223,19 @@ index e19cb5fb99d1013911ad892249a67b0575dcb1f6..19736bd0dfb4235d6f753a6452198b3c float dx = (Core.camera.position.x / tilesize); float dy = (Core.camera.position.y / tilesize); dx = Mathf.clamp(dx, sz, world.width() - sz); +diff --git a/core/src/mindustry/net/Net.java b/core/src/mindustry/net/Net.java +index 22b66b83cde27a73415b9154ed813cdfeb3d3b36..5eeadf6bfe2d6d61973494294be4277c68f6516c 100644 +--- a/core/src/mindustry/net/Net.java ++++ b/core/src/mindustry/net/Net.java +@@ -36,7 +36,7 @@ public class Net{ + private final ObjectMap, Cons> clientListeners = new ObjectMap<>(); + private final ObjectMap, Cons2> serverListeners = new ObjectMap<>(); + private final IntMap streams = new IntMap<>(); +- private final ExecutorService pingExecutor = OS.isWindows && !OS.is64Bit ? Threads.boundedExecutor("Ping Servers", 5) : Threads.unboundedExecutor(); ++ private final ExecutorService pingExecutor = OS.isWindows && !OS.is64Bit ? Threads.boundedExecutor("Ping Servers", 5) : Threads.unboundedExecutor("Ping Servers", 4);//MDTX: named and Keep 4 min + + private final NetProvider provider; + diff --git a/core/src/mindustry/ui/dialogs/JoinDialog.java b/core/src/mindustry/ui/dialogs/JoinDialog.java index 3b826c3c79d6e0aaf5d51b91ce4283aa5db486c7..8e612c40aeec86cf4c1cbe271096d72615d2e6f8 100644 --- a/core/src/mindustry/ui/dialogs/JoinDialog.java diff --git a/patches/client/0059-FC-reliableSync.patch b/patches/client/0059-FC-reliableSync.patch index 356f3251574c..a7466d97c59a 100644 --- a/patches/client/0059-FC-reliableSync.patch +++ b/patches/client/0059-FC-reliableSync.patch @@ -8,7 +8,7 @@ Subject: [PATCH] FC: reliableSync 1 file changed, 1 insertion(+) diff --git a/core/src/mindustry/net/Net.java b/core/src/mindustry/net/Net.java -index 22b66b83cde27a73415b9154ed813cdfeb3d3b36..a0ffd0d960772e45f16d935c46ffdcfcfaded35e 100644 +index 5eeadf6bfe2d6d61973494294be4277c68f6516c..a7d84b5651c86f3c6c96ab11a56a8f1feb09c349 100644 --- a/core/src/mindustry/net/Net.java +++ b/core/src/mindustry/net/Net.java @@ -231,6 +231,7 @@ public class Net{ diff --git a/patches/client/0069-HC-placeShiftReplacement.patch b/patches/client/0068-HC-placeShiftReplacement.patch similarity index 100% rename from patches/client/0069-HC-placeShiftReplacement.patch rename to patches/client/0068-HC-placeShiftReplacement.patch diff --git a/patches/client/0068-OC-limit-pingExecutor-Ping.patch b/patches/client/0068-OC-limit-pingExecutor-Ping.patch deleted file mode 100644 index e1e1f80912a3..000000000000 --- a/patches/client/0068-OC-limit-pingExecutor-Ping.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: way-zer -Date: Sat, 23 Nov 2024 19:43:57 +0800 -Subject: [PATCH] =?UTF-8?q?OC:=20limit=20pingExecutor(=E9=99=90=E5=88=B6Pi?= - =?UTF-8?q?ng=E5=B9=B6=E5=8F=91)?= -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - ---- - core/src/mindustry/net/Net.java | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/core/src/mindustry/net/Net.java b/core/src/mindustry/net/Net.java -index a0ffd0d960772e45f16d935c46ffdcfcfaded35e..f9d157d8fa2f9cc8889a47877e40bbf6167e1688 100644 ---- a/core/src/mindustry/net/Net.java -+++ b/core/src/mindustry/net/Net.java -@@ -36,7 +36,7 @@ public class Net{ - private final ObjectMap, Cons> clientListeners = new ObjectMap<>(); - private final ObjectMap, Cons2> serverListeners = new ObjectMap<>(); - private final IntMap streams = new IntMap<>(); -- private final ExecutorService pingExecutor = OS.isWindows && !OS.is64Bit ? Threads.boundedExecutor("Ping Servers", 5) : Threads.unboundedExecutor(); -+// private final ExecutorService pingExecutor = OS.isWindows && !OS.is64Bit ? Threads.boundedExecutor("Ping Servers", 5) : Threads.unboundedExecutor("Ping Servers", 4); - - private final NetProvider provider; - -@@ -337,7 +337,8 @@ public class Net{ - * If the port is the default mindustry port, SRV records are checked too. - */ - public void pingHost(String address, int port, Cons valid, Cons failed){ -- pingExecutor.submit(() -> provider.pingHost(address, port, valid, failed)); -+ //因为Ping会在瞬间添加大量请求,使用unbound会产生大量现在,而bounded始终只会使用单线程,故使用固定线程池mainExecutor -+ mainExecutor.submit(() -> provider.pingHost(address, port, valid, failed)); - } - - /** diff --git a/patches/client/0070-FC-extend-WaveInfoDialog.patch b/patches/client/0069-FC-extend-WaveInfoDialog.patch similarity index 100% rename from patches/client/0070-FC-extend-WaveInfoDialog.patch rename to patches/client/0069-FC-extend-WaveInfoDialog.patch diff --git a/patches/client/0071-FC-paste-logicCode-from-schematic.patch b/patches/client/0070-FC-paste-logicCode-from-schematic.patch similarity index 100% rename from patches/client/0071-FC-paste-logicCode-from-schematic.patch rename to patches/client/0070-FC-paste-logicCode-from-schematic.patch