Fix messages, fix /stats

This commit is contained in:
Shaun Bennett 2016-01-25 03:59:37 -06:00
parent d511ca5bad
commit 616be8aea7
2 changed files with 17 additions and 5 deletions

View File

@ -49,7 +49,7 @@ public class AchievementMainPage extends ShopPageBase<AchievementManager, Achiev
"XXXXOXXXO",
"OXOXOXOXO",
"OXOXOXOXO",
"XOXOXOXOX").getItemSlots();
"OXOXOXOXO").getItemSlots();
int listSlot = 0;
for (AchievementCategory category : AchievementCategory.values())

View File

@ -801,7 +801,7 @@ public class SpeedBuilders extends SoloGame
@Override
public void run()
{
UtilTextMiddle.display("", C.cAqua + GUARDIAN_NAME + " is Judging", 0, 30, 10);
UtilTextMiddle.display("", C.cAqua + GUARDIAN_NAME + " is Judging", 0, 40, 10);
}
}, 40L);
}
@ -865,12 +865,12 @@ public class SpeedBuilders extends SoloGame
if (!_buildRecreations.containsKey(player))
return;
double percent = ((double) _buildRecreations.get(player).calculateScoreFromBuild(_currentBuild) / _currentBuild.getPerfectScore()) * 100d;
int percent = (int) (((double) _buildRecreations.get(player).calculateScoreFromBuild(_currentBuild) / _currentBuild.getPerfectScore()) * 100d);
UtilTextMiddle.display("", C.cGold + "You scored " + C.cYellow + UtilMath.trim(1, percent) + " Percent", 0, 30, 10, player);
UtilTextMiddle.display("", getPercentPrefix(percent) + "You scored " + percent + " Percent", 0, 40, 10, player);
}
}
}, 80L);
}, 130L);
}
_lastElimination = System.currentTimeMillis();
@ -1042,6 +1042,18 @@ public class SpeedBuilders extends SoloGame
}
}
private String getPercentPrefix(int percent)
{
if (percent >= 75)
return C.cAqua;
else if (percent >= 50)
return C.cGreen;
else if (percent >= 25)
return C.cYellow;
else
return C.cRed;
}
@EventHandler
public void buildTimeProgressBar(UpdateEvent event)
{