mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-30 22:49:06 +07:00
Barely functional IO
This commit is contained in:
@ -255,7 +255,8 @@ public class DesktopLauncher extends ClientLauncher{
|
||||
|
||||
if(inGame){
|
||||
if(world.getMap() != null){
|
||||
gameMapWithWave = world.isZone() ? world.getZone().localizedName : Strings.capitalize(world.getMap().name());
|
||||
//TODO implement nice name for sector
|
||||
gameMapWithWave = Strings.capitalize(world.getMap().name());
|
||||
}
|
||||
if(state.rules.waves){
|
||||
gameMapWithWave += " | Wave " + state.wave;
|
||||
|
@ -349,7 +349,7 @@ public class SNet implements SteamNetworkingCallback, SteamMatchmakingCallback,
|
||||
currentLobby = steamID;
|
||||
|
||||
smat.setLobbyData(steamID, "name", player.name());
|
||||
smat.setLobbyData(steamID, "mapname", world.getMap() == null ? "Unknown" : state.rules.zone == null ? world.getMap().name() : state.rules.zone.localizedName);
|
||||
smat.setLobbyData(steamID, "mapname", world.getMap().name());
|
||||
smat.setLobbyData(steamID, "version", Version.build + "");
|
||||
smat.setLobbyData(steamID, "versionType", Version.type);
|
||||
smat.setLobbyData(steamID, "wave", state.wave + "");
|
||||
|
@ -187,9 +187,10 @@ public class SStats implements SteamUserStatsCallback{
|
||||
|
||||
Events.on(LoseEvent.class, e -> {
|
||||
if(campaign()){
|
||||
if(world.getZone().metCondition() && (state.wave - world.getZone().conditionWave) / world.getZone().launchPeriod >= 1){
|
||||
skipLaunching2Death.complete();
|
||||
}
|
||||
//TODO implement
|
||||
//if(world.getSector().metCondition() && (state.wave - world.getSector().conditionWave) / world.getSector().launchPeriod >= 1){
|
||||
// skipLaunching2Death.complete();
|
||||
//}
|
||||
}
|
||||
});
|
||||
|
||||
@ -239,7 +240,7 @@ public class SStats implements SteamUserStatsCallback{
|
||||
SStat.attacksWon.add();
|
||||
}
|
||||
|
||||
RankResult result = state.stats.calculateRank(world.getZone(), state.launched);
|
||||
RankResult result = state.stats.calculateRank(world.getSector(), state.launched);
|
||||
if(result.rank == Rank.S) earnSRank.complete();
|
||||
if(result.rank == Rank.SS) earnSSRank.complete();
|
||||
}
|
||||
@ -273,7 +274,7 @@ public class SStats implements SteamUserStatsCallback{
|
||||
}
|
||||
|
||||
private boolean campaign(){
|
||||
return Vars.world.isZone();
|
||||
return Vars.world.isCampaign();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user