More steam stuff

This commit is contained in:
Anuken 2019-09-15 10:38:36 -04:00
parent fb29324905
commit 8480e656b9
4 changed files with 29 additions and 7 deletions

View file

@ -210,6 +210,8 @@ map.nospawn.pvp = This map does not have any enemy cores for player to spawn int
map.nospawn.attack = This map does not have any enemy cores for player to attack! Add[SCARLET] red[] cores to this map in the editor.
map.invalid = Error loading map: corrupted or invalid map file.
map.publish.error = Error publishing map: {0}
map.publish.confirm = Are you sure you want to publish this map?\n\n[lightgray]Make sure you agree to the Workshop EULA first, or your maps will not show up!
eula = Steam EULA
map.publish = Map published.
map.publishing = [accent]Publishing map...
editor.brush = Brush

View file

@ -386,8 +386,9 @@ public class SNet implements SteamNetworkingCallback, SteamMatchmakingCallback,
}
@Override
public void onGameLobbyJoinRequested(SteamID steamID, SteamID steamIDFriend){
Log.info("onGameLobbyJoinRequested {0} {1}", steamID, steamIDFriend);
public void onGameLobbyJoinRequested(SteamID lobby, SteamID steamIDFriend){
Log.info("onGameLobbyJoinRequested {0} {1}", lobby, steamIDFriend);
smat.joinLobby(lobby);
}
@Override

View file

@ -168,7 +168,11 @@ public class SStats implements SteamUserStatsCallback{
Events.on(Trigger.suicideBomb, suicideBomb::complete);
Events.on(Trigger.thoriumReactorOverheat, SStat.reactorsOverheated::add);
Events.on(Trigger.thoriumReactorOverheat, () -> {
if(campaign()){
SStat.reactorsOverheated.add();
}
});
Events.on(Trigger.shock, shockWetEnemy::complete);

View file

@ -8,7 +8,9 @@ import io.anuke.arc.files.*;
import io.anuke.arc.util.*;
import io.anuke.mindustry.game.EventType.*;
import io.anuke.mindustry.game.*;
import io.anuke.mindustry.gen.*;
import io.anuke.mindustry.maps.*;
import io.anuke.mindustry.ui.dialogs.*;
import static io.anuke.mindustry.Vars.*;
@ -18,10 +20,22 @@ public class SWorkshop implements SteamUGCCallback{
private Map lastMap;
public void publishMap(Map map){
this.lastMap = map;
ugc.createItem(SVars.steamID, WorkshopFileType.GameManagedItem);
ui.loadfrag.show("$map.publishing");
Log.info("Publish map " + map.name());
FloatingDialog dialog = new FloatingDialog("$confirm");
dialog.setFillParent(false);
dialog.cont.add("$map.publish.confirm").width(600f).wrap();
dialog.addCloseButton();
dialog.buttons.addImageTextButton("$eula", Icon.linkSmall, () -> {
SVars.net.friends.activateGameOverlayToWebPage("https://steamcommunity.com/sharedfiles/workshoplegalagreement");
}).size(210f, 64f);
dialog.buttons.addImageTextButton("$ok", Icon.checkSmall, () -> {
this.lastMap = map;
ugc.createItem(SVars.steamID, WorkshopFileType.Community);
ui.loadfrag.show("$map.publishing");
Log.info("Publish map " + map.name());
dialog.hide();
}).size(170f, 64f);
dialog.show();
}
@Override
@ -109,6 +123,7 @@ public class SWorkshop implements SteamUGCCallback{
}else{
ui.showErrorMessage(Core.bundle.format("map.publish.error ", result.name()));
}
}
@Override