From 6de19200428979abe845eb85e710902098381c56 Mon Sep 17 00:00:00 2001 From: Anuken Date: Wed, 2 Sep 2020 09:35:03 -0400 Subject: [PATCH] Fixed #2476 --- .../sprites/units/toxopid-joint-base.png | Bin 0 -> 617 bytes core/src/mindustry/content/Blocks.java | 8 ++++--- core/src/mindustry/net/BeControl.java | 20 +++++++++++++++--- 3 files changed, 22 insertions(+), 6 deletions(-) create mode 100644 core/assets-raw/sprites/units/toxopid-joint-base.png diff --git a/core/assets-raw/sprites/units/toxopid-joint-base.png b/core/assets-raw/sprites/units/toxopid-joint-base.png new file mode 100644 index 0000000000000000000000000000000000000000..921a27e55c216d1205ca9555c3bc3fb1942555fb GIT binary patch literal 617 zcmV-v0+#)WP)Px%BS}O-RCt{2n@vu{FbqZu;wZD~nOGx^gjjQ?S#cLwMH*Fg{P)=@=zH5qo#ZLw zIBL3Wgb+dqxj0W9oqT+L{UGDLzrB`^ySxLmltHze(%@B6293lzqR2+ejc*PC5W$r5q=2X`_*q zlX@8W_Zbtnw6T(r6MnEFr&#Ec6H2~kQf3oJNs06mO~`JWniNaEKrrj)Y*l$zj;pbC zrC9Ps^)p#H=7zH+nOzm=RW{2*Ryn3dmj7vVGL||95$_R;9JPTbd3h(JO#&V75lzl? zSE@YwSSI1!nmuT9gPoNkNfX@`xdTGPR7r_EgOZaLQ!OR(EJDsyjMhPylt_&1*wqyy z1?ZL%iIo|<>92GQv`R`OW_0W?o(}f?CI+tDT0Q-pjZYi<8Ls4e6)7`Nm2`Snx{{Ou zVob0C@4wMn$8=F%#~eYQgeyShLG!LO0!!JwJ26K}2G7o9S~17Ttvc96Vn)ZVije}X zl7lENEn}aG(E@bKK~~(_@2z!AMo#xJ1X9OT%UN+YgB5sHa#kH!r(!DaxK&&O@u1C( zuTKQ{!cBm$Xa)FEUm%oRB{^M(%vnDODci=2Ln6FtCcw*y0=&*D0IO^xaxB+CR!G@4 zUYQr+M-~G7EJuJJatZL$KLLI$D!|W+2_b|K@>lr} literal 0 HcmV?d00001 diff --git a/core/src/mindustry/content/Blocks.java b/core/src/mindustry/content/Blocks.java index 2b4da903c4..8719d6311d 100644 --- a/core/src/mindustry/content/Blocks.java +++ b/core/src/mindustry/content/Blocks.java @@ -1504,12 +1504,13 @@ public class Blocks implements ContentList{ hasPower = true; size = 2; - force = 3f; + force = 4f; scaledForce = 5.5f; range = 170f; - damage = 0.08f; + damage = 0.1f; health = 160 * size * size; rotateSpeed = 10; + range = 85f; consumes.powerCond(3f, (TractorBeamEntity e) -> e.target != null); }}; @@ -1560,11 +1561,12 @@ public class Blocks implements ContentList{ segment = new PointDefenseTurret("segment"){{ requirements(Category.turret, with(Items.silicon, 130, Items.thorium, 80, Items.phasefabric, 25)); + range = 95f; hasPower = true; consumes.power(3f); size = 2; shootLength = 5f; - bulletDamage = 12f; + bulletDamage = 16f; reloadTime = 20f; health = 190 * size * size; }}; diff --git a/core/src/mindustry/net/BeControl.java b/core/src/mindustry/net/BeControl.java index 8fddbebaa4..a30308ed52 100644 --- a/core/src/mindustry/net/BeControl.java +++ b/core/src/mindustry/net/BeControl.java @@ -44,6 +44,17 @@ public class BeControl{ } }, updateInterval, updateInterval); } + + if(System.getProperties().contains("becopy")){ + try{ + Fi dest = Fi.get(System.getProperty("becopy")); + Fi self = Fi.get(BeControl.class.getProtectionDomain().getCodeSource().getLocation().toURI().getPath()); + + self.copyTo(dest); + }catch(Throwable e){ + e.printStackTrace(); + } + } } /** asynchronously checks for updates. */ @@ -87,14 +98,17 @@ public class BeControl{ boolean[] cancel = {false}; float[] progress = {0}; int[] length = {0}; - Fi file = Fi.get(BeControl.class.getProtectionDomain().getCodeSource().getLocation().toURI().getPath()); + Fi file = bebuildDirectory.child("client-be-" + updateBuild + ".jar"); + Fi fileDest = System.getProperties().contains("becopy") ? + Fi.get(System.getProperty("becopy")) : + Fi.get(BeControl.class.getProtectionDomain().getCodeSource().getLocation().toURI().getPath()); BaseDialog dialog = new BaseDialog("@be.updating"); download(updateUrl, file, i -> length[0] = i, v -> progress[0] = v, () -> cancel[0], () -> { try{ Runtime.getRuntime().exec(OS.isMac ? - new String[]{"java", "-XstartOnFirstThread", "-DlastBuild=" + Version.build, "-Dberestart", "-jar", file.absolutePath()} : - new String[]{"java", "-DlastBuild=" + Version.build, "-Dberestart", "-jar", file.absolutePath()} + new String[]{"java", "-XstartOnFirstThread", "-DlastBuild=" + Version.build, "-Dberestart", "-Dbecopy=" + fileDest.absolutePath(), "-jar", file.absolutePath()} : + new String[]{"java", "-DlastBuild=" + Version.build, "-Dberestart", "-Dbecopy=" + fileDest.absolutePath(), "-jar", file.absolutePath()} ); System.exit(0); }catch(IOException e){