Merge branch 'master' of https://github.com/Anuken/Mindustry into 7.0-features

This commit is contained in:
Anuken
2022-01-10 23:43:18 -05:00
8 changed files with 138 additions and 43 deletions

View File

@@ -105,11 +105,8 @@ public class SNet implements SteamNetworkingCallback, SteamMatchmakingCallback,
}
}));
Events.on(WaveEvent.class, e -> {
if(currentLobby != null && net.server()){
smat.setLobbyData(currentLobby, "wave", state.wave + "");
}
});
Events.on(WaveEvent.class, e -> updateWave());
Events.run(Trigger.newGame, this::updateWave);
}
public boolean isSteamClient(){
@@ -201,6 +198,14 @@ public class SNet implements SteamNetworkingCallback, SteamMatchmakingCallback,
smat.setLobbyMemberLimit(currentLobby, Core.settings.getInt("playerlimit"));
}
}
void updateWave(){
if(currentLobby != null && net.server()){
smat.setLobbyData(currentLobby, "mapname", state.map.name());
smat.setLobbyData(currentLobby, "wave", state.wave + "");
smat.setLobbyData(currentLobby, "gamemode", state.rules.mode().name() + "");
}
}
@Override
public void closeServer(){