mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-01-26 06:22:17 -08:00
Steam fixes
This commit is contained in:
parent
8616a82efc
commit
06e7b94b60
4 changed files with 12 additions and 17 deletions
|
|
@ -27,7 +27,7 @@ allprojects{
|
|||
appName = 'Mindustry'
|
||||
gdxVersion = '1.9.10'
|
||||
roboVMVersion = '2.3.8-SNAPSHOT'
|
||||
steamworksVersion = '1.8.0'
|
||||
steamworksVersion = 'f9ed19bbddd71f07999ca8f0ef354c04938aca41'
|
||||
arcHash = null
|
||||
|
||||
debugged = {
|
||||
|
|
@ -149,8 +149,7 @@ project(":desktop"){
|
|||
compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
|
||||
compile "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-desktop"
|
||||
|
||||
compile "com.code-disaster.steamworks4j:steamworks4j:$steamworksVersion"
|
||||
compile "com.code-disaster.steamworks4j:steamworks4j-server:$steamworksVersion"
|
||||
compile "com.github.Anuken:steamworks4j:$steamworksVersion"
|
||||
|
||||
compile arcModule("backends:backend-sdl")
|
||||
compile 'com.github.MinnDevelopment:java-discord-rpc:v2.0.1'
|
||||
|
|
|
|||
|
|
@ -137,11 +137,7 @@ public class DesktopLauncher extends ClientLauncher{
|
|||
});
|
||||
|
||||
try{
|
||||
try{
|
||||
SteamAPI.loadLibraries();
|
||||
}catch(Throwable t){
|
||||
logSteamError(t);
|
||||
}
|
||||
SteamAPI.loadLibraries();
|
||||
|
||||
if(!SteamAPI.init()){
|
||||
loadError = true;
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ public class SNet implements SteamNetworkingCallback, SteamMatchmakingCallback,
|
|||
try{
|
||||
//accept users on request
|
||||
if(con == null){
|
||||
con = new SteamConnection(SteamID.createFromNativeHandle(SteamNativeHandle.getNativeHandle(from)));
|
||||
con = new SteamConnection(SteamID.createFromNativeHandle(from.handle()));
|
||||
Connect c = new Connect();
|
||||
c.addressTCP = "steam:" + from.getAccountID();
|
||||
|
||||
|
|
@ -315,7 +315,7 @@ public class SNet implements SteamNetworkingCallback, SteamMatchmakingCallback,
|
|||
SteamID lobby = smat.getLobbyByIndex(i);
|
||||
Host out = new Host(
|
||||
smat.getLobbyData(lobby, "name"),
|
||||
"steam:" + SteamNativeHandle.getNativeHandle(lobby),
|
||||
"steam:" + lobby.handle(),
|
||||
smat.getLobbyData(lobby, "mapname"),
|
||||
Strings.parseInt(smat.getLobbyData(lobby, "wave"), -1),
|
||||
smat.getNumLobbyMembers(lobby),
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ public class SWorkshop implements SteamUGCCallback{
|
|||
}).size(210f, 64f);
|
||||
dialog.show();
|
||||
}else{
|
||||
SVars.net.friends.activateGameOverlayToWebPage("steam://url/CommunityFilePage/" + SteamNativeHandle.getNativeHandle(details.getPublishedFileID()));
|
||||
SVars.net.friends.activateGameOverlayToWebPage("steam://url/CommunityFilePage/" + details.getPublishedFileID().handle());
|
||||
}
|
||||
}else if(details.getResult() == SteamResult.FileNotFound){
|
||||
p.removeSteamID();
|
||||
|
|
@ -143,12 +143,12 @@ public class SWorkshop implements SteamUGCCallback{
|
|||
}
|
||||
|
||||
void viewListingID(SteamPublishedFileID id){
|
||||
SVars.net.friends.activateGameOverlayToWebPage("steam://url/CommunityFilePage/" + SteamNativeHandle.getNativeHandle(id));
|
||||
SVars.net.friends.activateGameOverlayToWebPage("steam://url/CommunityFilePage/" + id.handle());
|
||||
}
|
||||
|
||||
void update(Publishable p, SteamPublishedFileID id, String changelog){
|
||||
Log.info("Calling update({0}) {1}", p.steamTitle(), SteamNativeHandle.getNativeHandle(id));
|
||||
String sid = SteamNativeHandle.getNativeHandle(id) + "";
|
||||
Log.info("Calling update({0}) {1}", p.steamTitle(), id.handle());
|
||||
String sid = id.handle() + "";
|
||||
|
||||
updateItem(id, h -> {
|
||||
if(p.steamDescription() != null){
|
||||
|
|
@ -201,7 +201,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})", SteamNativeHandle.getNativeHandle(publishedFileID));
|
||||
Log.info("begin updateItem({0})", publishedFileID.handle());
|
||||
|
||||
tagger.get(h);
|
||||
Log.info("Tagged.");
|
||||
|
|
@ -290,10 +290,10 @@ public class SWorkshop implements SteamUGCCallback{
|
|||
@Override
|
||||
public void onSubmitItemUpdate(SteamPublishedFileID publishedFileID, boolean needsToAcceptWLA, SteamResult result){
|
||||
ui.loadfrag.hide();
|
||||
Log.info("onsubmititemupdate {0} {1} {2}", SteamNativeHandle.getNativeHandle(publishedFileID), needsToAcceptWLA, result);
|
||||
Log.info("onsubmititemupdate {0} {1} {2}", publishedFileID.handle(), needsToAcceptWLA, result);
|
||||
if(result == SteamResult.OK){
|
||||
//redirect user to page for further updates
|
||||
SVars.net.friends.activateGameOverlayToWebPage("steam://url/CommunityFilePage/" + SteamNativeHandle.getNativeHandle(publishedFileID));
|
||||
SVars.net.friends.activateGameOverlayToWebPage("steam://url/CommunityFilePage/" + publishedFileID.handle());
|
||||
if(needsToAcceptWLA){
|
||||
SVars.net.friends.activateGameOverlayToWebPage("https://steamcommunity.com/sharedfiles/workshoplegalagreement");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue