From 59e53eb6725183856fd7baa0f73b94c8c707cb1e Mon Sep 17 00:00:00 2001 From: Anuken Date: Fri, 9 Aug 2019 14:01:25 -0400 Subject: [PATCH] mandatory hosting/joining info --- core/assets/bundles/bundle.properties | 4 ++-- core/src/io/anuke/mindustry/ui/dialogs/HostDialog.java | 4 ++++ core/src/io/anuke/mindustry/ui/dialogs/JoinDialog.java | 2 ++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/core/assets/bundles/bundle.properties b/core/assets/bundles/bundle.properties index e5de75be4a..1aa893d26a 100644 --- a/core/assets/bundles/bundle.properties +++ b/core/assets/bundles/bundle.properties @@ -74,9 +74,9 @@ server.kicked.nameEmpty = Your chosen name is invalid. server.kicked.idInUse = You are already on this server! Connecting with two accounts is not permitted. server.kicked.customClient = This server does not support custom builds. Download an official version. server.kicked.gameover = Game over! -host.info = The [accent]host[] button hosts a server on port [scarlet]6567[]. \nAnybody on the same [lightgray]wifi or local network[] should be able to see your server in their server list.\n\nIf you want people to be able to connect from anywhere by IP, [accent]port forwarding[] is required.\n\n[lightgray]Note: If someone is experiencing trouble connecting to your LAN game, make sure you have allowed Mindustry access to your local network in your firewall settings. +host.info = The [accent]host[] button hosts a server on port [scarlet]6567[]. \nAnybody on the same [lightgray]wifi or local network[] should be able to see your server in their server list.\n\nIf you want people to be able to connect from anywhere by IP, [accent]port forwarding[] is required.\n\n[lightgray]Note: If someone is experiencing trouble connecting to your LAN game, make sure you have allowed Mindustry access to your local network in your firewall settings. Note that public networks sometimes do not allow server discovery. join.info = Here, you can enter a [accent]server IP[] to connect to, or discover [accent]local network[] servers to connect to.\nBoth LAN and WAN multiplayer is supported.\n\n[lightgray]Note: There is no automatic global server list; if you want to connect to someone by IP, you would need to ask the host for their IP. -hostserver = Host Game +hostserver = Host Multiplayer Game hostserver.mobile = Host\nGame host = Host hosting = [accent]Opening server... diff --git a/core/src/io/anuke/mindustry/ui/dialogs/HostDialog.java b/core/src/io/anuke/mindustry/ui/dialogs/HostDialog.java index 485d4c3d21..82ddf20e6b 100644 --- a/core/src/io/anuke/mindustry/ui/dialogs/HostDialog.java +++ b/core/src/io/anuke/mindustry/ui/dialogs/HostDialog.java @@ -64,5 +64,9 @@ public class HostDialog extends FloatingDialog{ }).width(w).height(70f); cont.addButton("?", () -> ui.showInfo("$host.info")).size(65f, 70f).padLeft(6f); + + shown(() -> { + Core.app.post(() -> Core.settings.getBoolOnce("hostinfo", () -> ui.showInfo("$host.info"))); + }); } } diff --git a/core/src/io/anuke/mindustry/ui/dialogs/JoinDialog.java b/core/src/io/anuke/mindustry/ui/dialogs/JoinDialog.java index 538860d466..71f72577fc 100644 --- a/core/src/io/anuke/mindustry/ui/dialogs/JoinDialog.java +++ b/core/src/io/anuke/mindustry/ui/dialogs/JoinDialog.java @@ -82,6 +82,8 @@ public class JoinDialog extends FloatingDialog{ setup(); refreshLocal(); refreshRemote(); + + Core.app.post(() -> Core.settings.getBoolOnce("joininfo", () -> ui.showInfo("$join.info"))); }); onResize(this::setup);