Added warning message for upgrading users of the game
This commit is contained in:
@@ -119,7 +119,8 @@ public class Control extends Module{
|
||||
"port", port+"",
|
||||
"name", android || gwt ? "player" : UCore.getProperty("user.name"),
|
||||
"servers", "",
|
||||
"color", Color.rgba8888(playerColors[8])
|
||||
"color", Color.rgba8888(playerColors[8]),
|
||||
"lastVersion", "3.2"
|
||||
);
|
||||
|
||||
KeyBinds.load();
|
||||
@@ -245,6 +246,23 @@ public class Control extends Module{
|
||||
return tutorial;
|
||||
}
|
||||
|
||||
private void checkOldUser(){
|
||||
boolean hasPlayed = false;
|
||||
|
||||
for(Map map : world.maps().getAllMaps()){
|
||||
if(Settings.getInt("hiscore" + map.name) != 0){
|
||||
hasPlayed = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(hasPlayed && Settings.getString("lastVersion").equals("3.2")){
|
||||
Timers.runTask(1f, () -> ui.showInfo("$text.changes"));
|
||||
Settings.putString("lastVersion", "3.3");
|
||||
Settings.save();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dispose(){
|
||||
Platform.instance.onGameExit();
|
||||
@@ -269,10 +287,11 @@ public class Control extends Module{
|
||||
Timers.run(1f, Musics::shuffleAll);
|
||||
|
||||
Entities.initPhysics();
|
||||
|
||||
Entities.collisions().setCollider(tilesize, world::solid);
|
||||
|
||||
Platform.instance.updateRPC();
|
||||
|
||||
checkOldUser();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user