Cleaner formatting
This commit is contained in:
@@ -150,7 +150,7 @@ public class DesktopLauncher extends ClientLauncher{
|
||||
long id = Long.parseLong(args[1]);
|
||||
ui.join.connect("steam:" + id, port);
|
||||
}catch(Exception e){
|
||||
Log.err("Failed to parse steam lobby ID: {0}", e.getMessage());
|
||||
Log.err("Failed to parse steam lobby ID: @", e.getMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ public class SNet implements SteamNetworkingCallback, SteamMatchmakingCallback,
|
||||
Connect c = new Connect();
|
||||
c.addressTCP = "steam:" + from.getAccountID();
|
||||
|
||||
Log.info("&bRecieved STEAM connection: {0}", c.addressTCP);
|
||||
Log.info("&bRecieved STEAM connection: @", c.addressTCP);
|
||||
|
||||
steamConnections.put(from.getAccountID(), con);
|
||||
connections.add(con);
|
||||
@@ -173,7 +173,7 @@ public class SNet implements SteamNetworkingCallback, SteamMatchmakingCallback,
|
||||
provider.hostServer(port);
|
||||
smat.createLobby(Core.settings.getBool("publichost") ? LobbyType.Public : LobbyType.FriendsOnly, Core.settings.getInt("playerlimit"));
|
||||
|
||||
Core.app.post(() -> Core.app.post(() -> Core.app.post(() -> Log.info("Server: {0}\nClient: {1}\nActive: {2}", net.server(), net.client(), net.active()))));
|
||||
Core.app.post(() -> Core.app.post(() -> Core.app.post(() -> Log.info("Server: @\nClient: @\nActive: @", net.server(), net.client(), net.active()))));
|
||||
}
|
||||
|
||||
public void updateLobby(){
|
||||
@@ -226,12 +226,12 @@ public class SNet implements SteamNetworkingCallback, SteamMatchmakingCallback,
|
||||
|
||||
@Override
|
||||
public void onLobbyInvite(SteamID steamIDUser, SteamID steamIDLobby, long gameID){
|
||||
Log.info("onLobbyInvite {0} {1} {2}", steamIDLobby.getAccountID(), steamIDUser.getAccountID(), gameID);
|
||||
Log.info("onLobbyInvite @ @ @", steamIDLobby.getAccountID(), steamIDUser.getAccountID(), gameID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLobbyEnter(SteamID steamIDLobby, int chatPermissions, boolean blocked, ChatRoomEnterResponse response){
|
||||
Log.info("enter lobby {0} {1}", steamIDLobby.getAccountID(), response);
|
||||
Log.info("enter lobby @ @", steamIDLobby.getAccountID(), response);
|
||||
|
||||
if(response != ChatRoomEnterResponse.Success){
|
||||
ui.loadfrag.hide();
|
||||
@@ -245,7 +245,7 @@ public class SNet implements SteamNetworkingCallback, SteamMatchmakingCallback,
|
||||
currentLobby = steamIDLobby;
|
||||
currentServer = smat.getLobbyOwner(steamIDLobby);
|
||||
|
||||
Log.info("Connect to owner {0}: {1}", currentServer.getAccountID(), friends.getFriendPersonaName(currentServer));
|
||||
Log.info("Connect to owner @: @", currentServer.getAccountID(), friends.getFriendPersonaName(currentServer));
|
||||
|
||||
if(joinCallback != null){
|
||||
joinCallback.run();
|
||||
@@ -258,7 +258,7 @@ public class SNet implements SteamNetworkingCallback, SteamMatchmakingCallback,
|
||||
net.setClientConnected();
|
||||
net.handleClientReceived(con);
|
||||
|
||||
Core.app.post(() -> Core.app.post(() -> Core.app.post(() -> Log.info("Server: {0}\nClient: {1}\nActive: {2}", net.server(), net.client(), net.active()))));
|
||||
Core.app.post(() -> Core.app.post(() -> Core.app.post(() -> Log.info("Server: @\nClient: @\nActive: @", net.server(), net.client(), net.active()))));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -268,7 +268,7 @@ public class SNet implements SteamNetworkingCallback, SteamMatchmakingCallback,
|
||||
|
||||
@Override
|
||||
public void onLobbyChatUpdate(SteamID lobby, SteamID who, SteamID changer, ChatMemberStateChange change){
|
||||
Log.info("lobby {0}: {1} caused {2}'s change: {3}", lobby.getAccountID(), who.getAccountID(), changer.getAccountID(), change);
|
||||
Log.info("lobby @: @ caused @'s change: @", lobby.getAccountID(), who.getAccountID(), changer.getAccountID(), change);
|
||||
if(change == ChatMemberStateChange.Disconnected || change == ChatMemberStateChange.Left){
|
||||
if(net.client()){
|
||||
//host left, leave as well
|
||||
@@ -295,7 +295,7 @@ public class SNet implements SteamNetworkingCallback, SteamMatchmakingCallback,
|
||||
|
||||
@Override
|
||||
public void onLobbyMatchList(int matches){
|
||||
Log.info("found {0} matches {1}", matches, lobbyDoneCallback);
|
||||
Log.info("found @ matches @", matches, lobbyDoneCallback);
|
||||
|
||||
if(lobbyDoneCallback != null){
|
||||
Array<Host> hosts = new Array<>();
|
||||
@@ -329,17 +329,17 @@ public class SNet implements SteamNetworkingCallback, SteamMatchmakingCallback,
|
||||
|
||||
@Override
|
||||
public void onLobbyKicked(SteamID steamID, SteamID steamID1, boolean b){
|
||||
Log.info("Kicked: {0} {1} {2}", steamID, steamID1, b);
|
||||
Log.info("Kicked: @ @ @", steamID, steamID1, b);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLobbyCreated(SteamResult result, SteamID steamID){
|
||||
if(!net.server()){
|
||||
Log.info("Lobby created on server: {0}, ignoring.", steamID);
|
||||
Log.info("Lobby created on server: @, ignoring.", steamID);
|
||||
return;
|
||||
}
|
||||
|
||||
Log.info("Lobby {1} created? {0}", result, steamID.getAccountID());
|
||||
Log.info("Lobby @ created? @", result, steamID.getAccountID());
|
||||
if(result == SteamResult.OK){
|
||||
currentLobby = steamID;
|
||||
|
||||
@@ -367,17 +367,17 @@ public class SNet implements SteamNetworkingCallback, SteamMatchmakingCallback,
|
||||
@Override
|
||||
public void onP2PSessionConnectFail(SteamID steamIDRemote, P2PSessionError sessionError){
|
||||
if(net.server()){
|
||||
Log.info("{0} has disconnected: {1}", steamIDRemote.getAccountID(), sessionError);
|
||||
Log.info("@ has disconnected: @", steamIDRemote.getAccountID(), sessionError);
|
||||
disconnectSteamUser(steamIDRemote);
|
||||
}else if(steamIDRemote.equals(currentServer)){
|
||||
Log.info("Disconnected! {1}: {0}", steamIDRemote.getAccountID(), sessionError);
|
||||
Log.info("Disconnected! @: @", steamIDRemote.getAccountID(), sessionError);
|
||||
net.handleClientReceived(new Disconnect());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onP2PSessionRequest(SteamID steamIDRemote){
|
||||
Log.info("Connection request: {0}", steamIDRemote.getAccountID());
|
||||
Log.info("Connection request: @", steamIDRemote.getAccountID());
|
||||
if(net.server()){
|
||||
Log.info("Am server, accepting request from " + steamIDRemote.getAccountID());
|
||||
snet.acceptP2PSessionWithUser(steamIDRemote);
|
||||
@@ -401,7 +401,7 @@ public class SNet implements SteamNetworkingCallback, SteamMatchmakingCallback,
|
||||
|
||||
@Override
|
||||
public void onGameLobbyJoinRequested(SteamID lobby, SteamID steamIDFriend){
|
||||
Log.info("onGameLobbyJoinRequested {0} {1}", lobby, steamIDFriend);
|
||||
Log.info("onGameLobbyJoinRequested @ @", lobby, steamIDFriend);
|
||||
smat.joinLobby(lobby);
|
||||
}
|
||||
|
||||
@@ -417,7 +417,7 @@ public class SNet implements SteamNetworkingCallback, SteamMatchmakingCallback,
|
||||
|
||||
@Override
|
||||
public void onGameRichPresenceJoinRequested(SteamID steamID, String connect){
|
||||
Log.info("onGameRichPresenceJoinRequested {0} {1}", steamID, connect);
|
||||
Log.info("onGameRichPresenceJoinRequested @ @", steamID, connect);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -432,7 +432,7 @@ public class SNet implements SteamNetworkingCallback, SteamMatchmakingCallback,
|
||||
public SteamConnection(SteamID sid){
|
||||
super(sid.getAccountID() + "");
|
||||
this.sid = sid;
|
||||
Log.info("Create STEAM client {0}", sid.getAccountID());
|
||||
Log.info("Create STEAM client @", sid.getAccountID());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -283,7 +283,7 @@ public class SStats implements SteamUserStatsCallback{
|
||||
registerEvents();
|
||||
|
||||
if(result != SteamResult.OK){
|
||||
Log.err("Failed to recieve steam stats: {0}", result);
|
||||
Log.err("Failed to recieve steam stats: @", result);
|
||||
}else{
|
||||
Log.info("Recieved steam stats.");
|
||||
}
|
||||
@@ -291,7 +291,7 @@ public class SStats implements SteamUserStatsCallback{
|
||||
|
||||
@Override
|
||||
public void onUserStatsStored(long gameID, SteamResult result){
|
||||
Log.info("Stored stats: {0}", result);
|
||||
Log.info("Stored stats: @", result);
|
||||
|
||||
if(result == SteamResult.OK){
|
||||
updated = true;
|
||||
|
||||
@@ -46,7 +46,7 @@ public class SWorkshop implements SteamUGCCallback{
|
||||
}
|
||||
|
||||
workshopFiles.each((type, list) -> {
|
||||
Log.info("Fetched content ({0}): {1}", type.getSimpleName(), list.size);
|
||||
Log.info("Fetched content (@): @", type.getSimpleName(), list.size);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ public class SWorkshop implements SteamUGCCallback{
|
||||
}
|
||||
|
||||
void update(Publishable p, SteamPublishedFileID id, String changelog){
|
||||
Log.info("Calling update({0}) {1}", p.steamTitle(), id.handle());
|
||||
Log.info("Calling update(@) @", p.steamTitle(), id.handle());
|
||||
String sid = id.handle() + "";
|
||||
|
||||
updateItem(id, h -> {
|
||||
@@ -204,7 +204,7 @@ public class SWorkshop implements SteamUGCCallback{
|
||||
void updateItem(SteamPublishedFileID publishedFileID, Cons<SteamUGCUpdateHandle> tagger, Runnable updated){
|
||||
try{
|
||||
SteamUGCUpdateHandle h = ugc.startItemUpdate(SVars.steamID, publishedFileID);
|
||||
Log.info("begin updateItem({0})", publishedFileID.handle());
|
||||
Log.info("begin updateItem(@)", publishedFileID.handle());
|
||||
|
||||
tagger.get(h);
|
||||
Log.info("Tagged.");
|
||||
@@ -240,7 +240,7 @@ public class SWorkshop implements SteamUGCCallback{
|
||||
if(detailHandlers.containsKey(query)){
|
||||
Log.info("Query being handled...");
|
||||
if(numResultsReturned > 0){
|
||||
Log.info("{0} q results", numResultsReturned);
|
||||
Log.info("@ q results", numResultsReturned);
|
||||
Array<SteamUGCDetails> details = new Array<>();
|
||||
for(int i = 0; i < numResultsReturned; i++){
|
||||
details.add(new SteamUGCDetails());
|
||||
@@ -262,7 +262,7 @@ public class SWorkshop implements SteamUGCCallback{
|
||||
public void onSubscribeItem(SteamPublishedFileID publishedFileID, SteamResult result){
|
||||
ItemInstallInfo info = new ItemInstallInfo();
|
||||
ugc.getItemInstallInfo(publishedFileID, info);
|
||||
Log.info("Item subscribed from {0}", info.getFolder());
|
||||
Log.info("Item subscribed from @", info.getFolder());
|
||||
SAchievement.downloadMapWorkshop.complete();
|
||||
}
|
||||
|
||||
@@ -270,7 +270,7 @@ public class SWorkshop implements SteamUGCCallback{
|
||||
public void onUnsubscribeItem(SteamPublishedFileID publishedFileID, SteamResult result){
|
||||
ItemInstallInfo info = new ItemInstallInfo();
|
||||
ugc.getItemInstallInfo(publishedFileID, info);
|
||||
Log.info("Item unsubscribed from {0}", info.getFolder());
|
||||
Log.info("Item unsubscribed from @", info.getFolder());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -293,7 +293,7 @@ public class SWorkshop implements SteamUGCCallback{
|
||||
@Override
|
||||
public void onSubmitItemUpdate(SteamPublishedFileID publishedFileID, boolean needsToAcceptWLA, SteamResult result){
|
||||
ui.loadfrag.hide();
|
||||
Log.info("onsubmititemupdate {0} {1} {2}", publishedFileID.handle(), needsToAcceptWLA, result);
|
||||
Log.info("onsubmititemupdate @ @ @", publishedFileID.handle(), needsToAcceptWLA, result);
|
||||
if(result == SteamResult.OK){
|
||||
//redirect user to page for further updates
|
||||
SVars.net.friends.activateGameOverlayToWebPage("steam://url/CommunityFilePage/" + publishedFileID.handle());
|
||||
@@ -314,7 +314,7 @@ public class SWorkshop implements SteamUGCCallback{
|
||||
SAchievement.downloadMapWorkshop.complete();
|
||||
ItemInstallInfo info = new ItemInstallInfo();
|
||||
ugc.getItemInstallInfo(publishedFileID, info);
|
||||
Log.info("Item downloaded to {0}", info.getFolder());
|
||||
Log.info("Item downloaded to @", info.getFolder());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -351,6 +351,6 @@ public class SWorkshop implements SteamUGCCallback{
|
||||
public void onDeleteItem(SteamPublishedFileID publishedFileID, SteamResult result){
|
||||
ItemInstallInfo info = new ItemInstallInfo();
|
||||
ugc.getItemInstallInfo(publishedFileID, info);
|
||||
Log.info("Item removed from {0}", info.getFolder());
|
||||
Log.info("Item removed from @", info.getFolder());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user