More steam stuff
This commit is contained in:
@@ -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.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.invalid = Error loading map: corrupted or invalid map file.
|
||||||
map.publish.error = Error publishing map: {0}
|
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.publish = Map published.
|
||||||
map.publishing = [accent]Publishing map...
|
map.publishing = [accent]Publishing map...
|
||||||
editor.brush = Brush
|
editor.brush = Brush
|
||||||
|
|||||||
@@ -386,8 +386,9 @@ public class SNet implements SteamNetworkingCallback, SteamMatchmakingCallback,
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onGameLobbyJoinRequested(SteamID steamID, SteamID steamIDFriend){
|
public void onGameLobbyJoinRequested(SteamID lobby, SteamID steamIDFriend){
|
||||||
Log.info("onGameLobbyJoinRequested {0} {1}", steamID, steamIDFriend);
|
Log.info("onGameLobbyJoinRequested {0} {1}", lobby, steamIDFriend);
|
||||||
|
smat.joinLobby(lobby);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -168,7 +168,11 @@ public class SStats implements SteamUserStatsCallback{
|
|||||||
|
|
||||||
Events.on(Trigger.suicideBomb, suicideBomb::complete);
|
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);
|
Events.on(Trigger.shock, shockWetEnemy::complete);
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,9 @@ import io.anuke.arc.files.*;
|
|||||||
import io.anuke.arc.util.*;
|
import io.anuke.arc.util.*;
|
||||||
import io.anuke.mindustry.game.EventType.*;
|
import io.anuke.mindustry.game.EventType.*;
|
||||||
import io.anuke.mindustry.game.*;
|
import io.anuke.mindustry.game.*;
|
||||||
|
import io.anuke.mindustry.gen.*;
|
||||||
import io.anuke.mindustry.maps.*;
|
import io.anuke.mindustry.maps.*;
|
||||||
|
import io.anuke.mindustry.ui.dialogs.*;
|
||||||
|
|
||||||
import static io.anuke.mindustry.Vars.*;
|
import static io.anuke.mindustry.Vars.*;
|
||||||
|
|
||||||
@@ -18,10 +20,22 @@ public class SWorkshop implements SteamUGCCallback{
|
|||||||
private Map lastMap;
|
private Map lastMap;
|
||||||
|
|
||||||
public void publishMap(Map map){
|
public void publishMap(Map map){
|
||||||
|
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;
|
this.lastMap = map;
|
||||||
ugc.createItem(SVars.steamID, WorkshopFileType.GameManagedItem);
|
ugc.createItem(SVars.steamID, WorkshopFileType.Community);
|
||||||
ui.loadfrag.show("$map.publishing");
|
ui.loadfrag.show("$map.publishing");
|
||||||
Log.info("Publish map " + map.name());
|
Log.info("Publish map " + map.name());
|
||||||
|
dialog.hide();
|
||||||
|
}).size(170f, 64f);
|
||||||
|
dialog.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -109,6 +123,7 @@ public class SWorkshop implements SteamUGCCallback{
|
|||||||
}else{
|
}else{
|
||||||
ui.showErrorMessage(Core.bundle.format("map.publish.error ", result.name()));
|
ui.showErrorMessage(Core.bundle.format("map.publish.error ", result.name()));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user