diff --git a/core/src/mindustry/type/Weapon.java b/core/src/mindustry/type/Weapon.java index 6870046bd9..318a801e60 100644 --- a/core/src/mindustry/type/Weapon.java +++ b/core/src/mindustry/type/Weapon.java @@ -338,7 +338,7 @@ public class Weapon implements Cloneable{ mount.bullet.set(bulletX, bulletY); mount.reload = reload; mount.recoil = 1f; - unit.vel.add(Tmp.v1.trns(unit.rotation + 180f, mount.bullet.type.recoil)); + unit.vel.add(Tmp.v1.trns(unit.rotation + 180f, mount.bullet.type.recoil * Time.delta)); if(shootSound != Sounds.none && !headless){ if(mount.sound == null) mount.sound = new SoundLoop(shootSound, 1f); mount.sound.update(bulletX, bulletY, true); diff --git a/core/src/mindustry/ui/dialogs/TraceDialog.java b/core/src/mindustry/ui/dialogs/TraceDialog.java index 53b4f59b92..5d835b8a2c 100644 --- a/core/src/mindustry/ui/dialogs/TraceDialog.java +++ b/core/src/mindustry/ui/dialogs/TraceDialog.java @@ -4,6 +4,9 @@ import arc.*; import arc.scene.ui.layout.*; import mindustry.gen.*; import mindustry.net.Administration.*; +import mindustry.ui.*; + +import static mindustry.Vars.*; public class TraceDialog extends BaseDialog{ @@ -22,12 +25,20 @@ public class TraceDialog extends BaseDialog{ table.defaults().pad(1); table.defaults().left(); - table.add(Core.bundle.format("trace.playername", player.name)); - table.row(); - table.add(Core.bundle.format("trace.ip", info.ip)); - table.row(); - table.add(Core.bundle.format("trace.id", info.uuid)); - table.row(); + + var style = Styles.emptyi; + float s = 28f; + + table.table(c -> { + c.left().defaults().left(); + c.button(Icon.copySmall, style, () -> copy(player.name)).size(s).padRight(4f); + c.add(Core.bundle.format("trace.playername", player.name)).row(); + c.button(Icon.copySmall, style, () -> copy(info.ip)).size(s).padRight(4f); + c.add(Core.bundle.format("trace.ip", info.ip)).row(); + c.button(Icon.copySmall, style, () -> copy(info.uuid)).size(s).padRight(4f); + c.add(Core.bundle.format("trace.id", info.uuid)).row(); + }).row(); + table.add(Core.bundle.format("trace.modclient", info.modded)); table.row(); table.add(Core.bundle.format("trace.mobile", info.mobile)); @@ -44,4 +55,9 @@ public class TraceDialog extends BaseDialog{ show(); } + + private void copy(String content){ + Core.app.setClipboardText(content); + ui.showInfoFade("@copied"); + } }