Steam stuff
This commit is contained in:
@@ -210,14 +210,7 @@ public class SNet implements SteamNetworkingCallback, SteamMatchmakingCallback,
|
||||
|
||||
@Override
|
||||
public void onLobbyInvite(SteamID steamIDUser, SteamID steamIDLobby, long gameID){
|
||||
Log.info("lobby invite {0} {1} {2}", steamIDLobby.getAccountID(), steamIDUser.getAccountID(), gameID);
|
||||
|
||||
//ignore invites when hosting.
|
||||
if(net.server()) return;
|
||||
|
||||
ui.showConfirm("Someone has invited you to a game.", "But do you accept?", () -> {
|
||||
smat.joinLobby(steamIDLobby);
|
||||
});
|
||||
Log.info("onLobbyInvite {0} {1} {2}", steamIDLobby.getAccountID(), steamIDUser.getAccountID(), gameID);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -393,8 +386,8 @@ public class SNet implements SteamNetworkingCallback, SteamMatchmakingCallback,
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onGameLobbyJoinRequested(SteamID steamID, SteamID steamID1){
|
||||
|
||||
public void onGameLobbyJoinRequested(SteamID steamID, SteamID steamIDFriend){
|
||||
Log.info("onGameLobbyJoinRequested {0} {1}", steamID, steamIDFriend);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -408,12 +401,12 @@ public class SNet implements SteamNetworkingCallback, SteamMatchmakingCallback,
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onGameRichPresenceJoinRequested(SteamID steamID, String s){
|
||||
|
||||
public void onGameRichPresenceJoinRequested(SteamID steamID, String connect){
|
||||
Log.info("onGameRichPresenceJoinRequested {0} {1}", steamID, connect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onGameServerChangeRequested(String s, String s1){
|
||||
public void onGameServerChangeRequested(String server, String password){
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ public class SWorkshop implements SteamUGCCallback{
|
||||
ugc.setItemTitle(h, map.name());
|
||||
ugc.setItemDescription(h, map.description());
|
||||
ugc.setItemTags(h, new String[]{"map", mode.name()});
|
||||
ugc.setItemVisibility(h, PublishedFileVisibility.Public);
|
||||
ugc.setItemVisibility(h, PublishedFileVisibility.Private);
|
||||
ugc.setItemPreview(h, map.previewFile().absolutePath());
|
||||
ugc.setItemContent(h, mapFile.parent().absolutePath());
|
||||
ugc.addItemKeyValueTag(h, "mode", mode.name());
|
||||
@@ -102,6 +102,9 @@ public class SWorkshop implements SteamUGCCallback{
|
||||
if(result == SteamResult.OK){
|
||||
//redirect user to page for further updates
|
||||
SVars.net.friends.activateGameOverlayToWebPage("steam://url/CommunityFilePage/" + SteamNativeHandle.getNativeHandle(publishedFileID));
|
||||
if(needsToAcceptWLA){
|
||||
SVars.net.friends.activateGameOverlayToWebPage("https://steamcommunity.com/sharedfiles/workshoplegalagreement");
|
||||
}
|
||||
Events.fire(new MapPublishEvent());
|
||||
}else{
|
||||
ui.showErrorMessage(Core.bundle.format("map.publish.error ", result.name()));
|
||||
|
||||
Reference in New Issue
Block a user