mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-10-02 03:00:29 +03:00
Reset public game visibility value to false because people keep making it public by accident
This commit is contained in:
@@ -64,7 +64,7 @@ public class SteamAdmin{
|
||||
|
||||
public static boolean isBanned(String id){
|
||||
//bans are ignored with private lobbies
|
||||
if(!id.startsWith("steam:") || !Core.settings.getBool("steampublichost")) return false;
|
||||
if(!id.startsWith("steam:") || !Core.settings.getBool("steampublichost2")) return false;
|
||||
return data.bans.contains(id.substring("steam:".length()));
|
||||
}
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ public class HostDialog extends BaseDialog{
|
||||
|
||||
cont.add().width(65f);
|
||||
|
||||
cont.check("@steam.friendsonly", !Core.settings.getBool("steampublichost"), val -> Core.settings.put("steampublichost", !val)).colspan(2).left()
|
||||
cont.check("@steam.friendsonly", !Core.settings.getBool("steampublichost2"), val -> Core.settings.put("steampublichost2", !val)).colspan(2).left()
|
||||
.with(c -> ui.addDescTooltip(c, "@steam.friendsonly.tooltip")).padBottom(15f).row();
|
||||
}
|
||||
|
||||
@@ -98,9 +98,9 @@ public class HostDialog extends BaseDialog{
|
||||
player.admin = true;
|
||||
Events.fire(new HostEvent());
|
||||
|
||||
if(steam && Core.settings.getBool("steampublichost")){
|
||||
if(steam && Core.settings.getBool("steampublichost2")){
|
||||
if(Version.modifier.contains("beta") || Version.modifier.contains("alpha")){
|
||||
Core.settings.put("steampublichost", false);
|
||||
Core.settings.put("steampublichost2", false);
|
||||
platform.updateLobby();
|
||||
Core.settings.getBoolOnce("betapublic", () -> ui.showInfo("@public.beta"));
|
||||
}
|
||||
|
||||
@@ -59,8 +59,8 @@ public class PausedDialog extends BaseDialog{
|
||||
|
||||
if(!mobile){
|
||||
if(steam){
|
||||
cont.check("@steam.friendsonly", !Core.settings.getBool("steampublichost"), val -> {
|
||||
Core.settings.put("steampublichost", !val);
|
||||
cont.check("@steam.friendsonly", !Core.settings.getBool("steampublichost2"), val -> {
|
||||
Core.settings.put("steampublichost2", !val);
|
||||
platform.updateLobby();
|
||||
}).colspan(2).left().with(c -> ui.addDescTooltip(c, "@steam.friendsonly.tooltip")).width(440f)
|
||||
.visible(() -> net.server()).center().colspan(2).fillX().padBottom(10f).row();
|
||||
|
||||
@@ -196,14 +196,14 @@ public class SNet implements SteamNetworkingCallback, SteamMatchmakingCallback,
|
||||
@Override
|
||||
public void hostServer(int port) throws IOException{
|
||||
provider.hostServer(port);
|
||||
smat.createLobby(Core.settings.getBool("steampublichost") ? LobbyType.Public : LobbyType.FriendsOnly, Core.settings.getInt("playerlimit"));
|
||||
smat.createLobby(Core.settings.getBool("steampublichost2") ? LobbyType.Public : LobbyType.FriendsOnly, Core.settings.getInt("playerlimit"));
|
||||
|
||||
Core.app.post(() -> Core.app.post(() -> Core.app.post(() -> Log.info("Server: @\nClient: @\nActive: @", net.server(), net.client(), net.active()))));
|
||||
}
|
||||
|
||||
public void updateLobby(){
|
||||
if(currentLobby != null && net.server()){
|
||||
smat.setLobbyType(currentLobby, Core.settings.getBool("steampublichost") ? LobbyType.Public : LobbyType.FriendsOnly);
|
||||
smat.setLobbyType(currentLobby, Core.settings.getBool("steampublichost2") ? LobbyType.Public : LobbyType.FriendsOnly);
|
||||
smat.setLobbyMemberLimit(currentLobby, Core.settings.getInt("playerlimit"));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user