Skip to content

Commit

Permalink
Show game version in score scene
Browse files Browse the repository at this point in the history
  • Loading branch information
EdrowsLuo committed Dec 25, 2020
1 parent 94f3649 commit 170fb1b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def getReleaseVersionCode() {

def getReleaseVersionName() {
def baseline = '1.6.8'
def versionName = baseline + new Date().format('.MMdd')
def versionName = baseline + new Date().format('(MMddhh)')
println('versionName: ' + versionName)
return versionName
}
Expand Down
16 changes: 9 additions & 7 deletions src/ru/nsu/ccfit/zuev/osu/scoring/ScoringScene.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import ru.nsu.ccfit.zuev.osu.menu.SongMenu;
import ru.nsu.ccfit.zuev.osu.online.OnlineManager;
import ru.nsu.ccfit.zuev.osu.online.SendingPanel;
import ru.nsu.ccfit.zuev.osuplus.BuildConfig;
import ru.nsu.ccfit.zuev.osuplus.R;

public class ScoringScene {
Expand Down Expand Up @@ -85,18 +86,19 @@ public void load(final StatisticV2 stat, final TrackInfo track,
String mapperStr = "Beatmap by " + trackInfo.getCreator();
String playerStr = "Played by " + stat.getPlayerName() + " on " +
new java.text.SimpleDateFormat("yyyy/MM/dd HH:mm:ss", Locale.getDefault()).format(new java.util.Date(stat.getTime()));
playerStr += String.format(" %s(%s)", BuildConfig.VERSION_NAME, BuildConfig.BUILD_TYPE);
if (stat.getChangeSpeed() != 1 || stat.isEnableForceAR()){
playerStr += " [";
mapperStr += " [";
if (stat.getChangeSpeed() != 1){
playerStr += String.format("%.2fx,", stat.getChangeSpeed());
mapperStr += String.format("%.2fx,", stat.getChangeSpeed());
}
if (stat.isEnableForceAR()){
playerStr += String.format("AR%.1f,", stat.getForceAR());
mapperStr += String.format("AR%.1f,", stat.getForceAR());
}
if (playerStr.endsWith(",")){
playerStr = playerStr.substring(0, playerStr.length() - 1);
if (mapperStr.endsWith(",")){
mapperStr = playerStr.substring(0, playerStr.length() - 1);
}
playerStr += "]";
mapperStr += "]";
}
//calculatePP
if (Config.isDisplayScorePP()){
Expand All @@ -123,7 +125,7 @@ public void load(final StatisticV2 stat, final TrackInfo track,
ppinfo.append(String.format("Spd:%.0f/%.0f,", spdpp, max_spdpp));
ppinfo.append(String.format("Acc:%.0f/%.0f)", accpp, max_accpp));
ppinfo.append("]");
playerStr += " " + ppinfo.toString();
mapperStr += " " + ppinfo.toString();
}
//
Debug.i("playedtime " + stat.getTime());
Expand Down

0 comments on commit 170fb1b

Please sign in to comment.