Lobby prefs
This commit is contained in:
@@ -156,6 +156,11 @@ public class DesktopLauncher extends ClientLauncher{
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateLobby(){
|
||||
steamCore.updateLobby();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showFileChooser(String text, String content, Consumer<FileHandle> cons, boolean open, Predicate<String> filetype){
|
||||
new FileChooser(text, file -> filetype.test(file.extension().toLowerCase()), open, cons).show();
|
||||
|
||||
@@ -147,7 +147,13 @@ public class SteamCoreNetImpl implements SteamNetworkingCallback, SteamMatchmaki
|
||||
|
||||
@Override
|
||||
public void host(int port) throws IOException{
|
||||
smat.createLobby(LobbyType.values()[Core.settings.getInt("lobbytype", 2)], 32);
|
||||
smat.createLobby(Core.settings.getBool("publichost") ? LobbyType.Public : LobbyType.FriendsOnly, 32);
|
||||
}
|
||||
|
||||
public void updateLobby(){
|
||||
if(currentLobby != null && Net.server()){
|
||||
smat.setLobbyType(currentLobby, Core.settings.getBool("publichost") ? LobbyType.Public : LobbyType.FriendsOnly);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user